(0) Obligation:

The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

#abs(#0) → #0
#abs(#neg(@x)) → #pos(@x)
#abs(#pos(@x)) → #pos(@x)
#abs(#s(@x)) → #pos(#s(@x))
#equal(@x, @y) → #eq(@x, @y)
#greater(@x, @y) → #ckgt(#compare(@x, @y))
+(@x, @y) → #add(@x, @y)
firstline(@l) → firstline#1(@l)
firstline#1(::(@x, @xs)) → ::(#abs(#0), firstline(@xs))
firstline#1(nil) → nil
lcs(@l1, @l2) → lcs#1(lcstable(@l1, @l2))
lcs#1(@m) → lcs#2(@m)
lcs#2(::(@l1, @_@2)) → lcs#3(@l1)
lcs#2(nil) → #abs(#0)
lcs#3(::(@len, @_@1)) → @len
lcs#3(nil) → #abs(#0)
lcstable(@l1, @l2) → lcstable#1(@l1, @l2)
lcstable#1(::(@x, @xs), @l2) → lcstable#2(lcstable(@xs, @l2), @l2, @x)
lcstable#1(nil, @l2) → ::(firstline(@l2), nil)
lcstable#2(@m, @l2, @x) → lcstable#3(@m, @l2, @x)
lcstable#3(::(@l, @ls), @l2, @x) → ::(newline(@x, @l, @l2), ::(@l, @ls))
lcstable#3(nil, @l2, @x) → nil
max(@a, @b) → max#1(#greater(@a, @b), @a, @b)
max#1(#false, @a, @b) → @b
max#1(#true, @a, @b) → @a
newline(@y, @lastline, @l) → newline#1(@l, @lastline, @y)
newline#1(::(@x, @xs), @lastline, @y) → newline#2(@lastline, @x, @xs, @y)
newline#1(nil, @lastline, @y) → nil
newline#2(::(@belowVal, @lastline'), @x, @xs, @y) → newline#3(newline(@y, @lastline', @xs), @belowVal, @lastline', @x, @y)
newline#2(nil, @x, @xs, @y) → nil
newline#3(@nl, @belowVal, @lastline', @x, @y) → newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y)
newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) → newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y)
newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) → newline#6(newline#7(#equal(@x, @y), @belowVal, @diagVal, @rightVal), @nl)
newline#6(@elem, @nl) → ::(@elem, @nl)
newline#7(#false, @belowVal, @diagVal, @rightVal) → max(@belowVal, @rightVal)
newline#7(#true, @belowVal, @diagVal, @rightVal) → +(@diagVal, #pos(#s(#0)))
right(@l) → right#1(@l)
right#1(::(@x, @xs)) → @x
right#1(nil) → #abs(#0)

The (relative) TRS S consists of the following rules:

#add(#0, @y) → @y
#add(#neg(#s(#0)), @y) → #pred(@y)
#add(#neg(#s(#s(@x))), @y) → #pred(#add(#pos(#s(@x)), @y))
#add(#pos(#s(#0)), @y) → #succ(@y)
#add(#pos(#s(#s(@x))), @y) → #succ(#add(#pos(#s(@x)), @y))
#and(#false, #false) → #false
#and(#false, #true) → #false
#and(#true, #false) → #false
#and(#true, #true) → #true
#ckgt(#EQ) → #false
#ckgt(#GT) → #true
#ckgt(#LT) → #false
#compare(#0, #0) → #EQ
#compare(#0, #neg(@y)) → #GT
#compare(#0, #pos(@y)) → #LT
#compare(#0, #s(@y)) → #LT
#compare(#neg(@x), #0) → #LT
#compare(#neg(@x), #neg(@y)) → #compare(@y, @x)
#compare(#neg(@x), #pos(@y)) → #LT
#compare(#pos(@x), #0) → #GT
#compare(#pos(@x), #neg(@y)) → #GT
#compare(#pos(@x), #pos(@y)) → #compare(@x, @y)
#compare(#s(@x), #0) → #GT
#compare(#s(@x), #s(@y)) → #compare(@x, @y)
#eq(#0, #0) → #true
#eq(#0, #neg(@y)) → #false
#eq(#0, #pos(@y)) → #false
#eq(#0, #s(@y)) → #false
#eq(#neg(@x), #0) → #false
#eq(#neg(@x), #neg(@y)) → #eq(@x, @y)
#eq(#neg(@x), #pos(@y)) → #false
#eq(#pos(@x), #0) → #false
#eq(#pos(@x), #neg(@y)) → #false
#eq(#pos(@x), #pos(@y)) → #eq(@x, @y)
#eq(#s(@x), #0) → #false
#eq(#s(@x), #s(@y)) → #eq(@x, @y)
#eq(::(@x_1, @x_2), ::(@y_1, @y_2)) → #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
#eq(::(@x_1, @x_2), nil) → #false
#eq(nil, ::(@y_1, @y_2)) → #false
#eq(nil, nil) → #true
#pred(#0) → #neg(#s(#0))
#pred(#neg(#s(@x))) → #neg(#s(#s(@x)))
#pred(#pos(#s(#0))) → #0
#pred(#pos(#s(#s(@x)))) → #pos(#s(@x))
#succ(#0) → #pos(#s(#0))
#succ(#neg(#s(#0))) → #0
#succ(#neg(#s(#s(@x)))) → #neg(#s(@x))
#succ(#pos(#s(@x))) → #pos(#s(#s(@x)))

Rewrite Strategy: INNERMOST

(1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID) transformation)

Transformed relative TRS to weighted TRS

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

#abs(#0) → #0 [1]
#abs(#neg(@x)) → #pos(@x) [1]
#abs(#pos(@x)) → #pos(@x) [1]
#abs(#s(@x)) → #pos(#s(@x)) [1]
#equal(@x, @y) → #eq(@x, @y) [1]
#greater(@x, @y) → #ckgt(#compare(@x, @y)) [1]
+(@x, @y) → #add(@x, @y) [1]
firstline(@l) → firstline#1(@l) [1]
firstline#1(::(@x, @xs)) → ::(#abs(#0), firstline(@xs)) [1]
firstline#1(nil) → nil [1]
lcs(@l1, @l2) → lcs#1(lcstable(@l1, @l2)) [1]
lcs#1(@m) → lcs#2(@m) [1]
lcs#2(::(@l1, @_@2)) → lcs#3(@l1) [1]
lcs#2(nil) → #abs(#0) [1]
lcs#3(::(@len, @_@1)) → @len [1]
lcs#3(nil) → #abs(#0) [1]
lcstable(@l1, @l2) → lcstable#1(@l1, @l2) [1]
lcstable#1(::(@x, @xs), @l2) → lcstable#2(lcstable(@xs, @l2), @l2, @x) [1]
lcstable#1(nil, @l2) → ::(firstline(@l2), nil) [1]
lcstable#2(@m, @l2, @x) → lcstable#3(@m, @l2, @x) [1]
lcstable#3(::(@l, @ls), @l2, @x) → ::(newline(@x, @l, @l2), ::(@l, @ls)) [1]
lcstable#3(nil, @l2, @x) → nil [1]
max(@a, @b) → max#1(#greater(@a, @b), @a, @b) [1]
max#1(#false, @a, @b) → @b [1]
max#1(#true, @a, @b) → @a [1]
newline(@y, @lastline, @l) → newline#1(@l, @lastline, @y) [1]
newline#1(::(@x, @xs), @lastline, @y) → newline#2(@lastline, @x, @xs, @y) [1]
newline#1(nil, @lastline, @y) → nil [1]
newline#2(::(@belowVal, @lastline'), @x, @xs, @y) → newline#3(newline(@y, @lastline', @xs), @belowVal, @lastline', @x, @y) [1]
newline#2(nil, @x, @xs, @y) → nil [1]
newline#3(@nl, @belowVal, @lastline', @x, @y) → newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) [1]
newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) → newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) [1]
newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) → newline#6(newline#7(#equal(@x, @y), @belowVal, @diagVal, @rightVal), @nl) [1]
newline#6(@elem, @nl) → ::(@elem, @nl) [1]
newline#7(#false, @belowVal, @diagVal, @rightVal) → max(@belowVal, @rightVal) [1]
newline#7(#true, @belowVal, @diagVal, @rightVal) → +(@diagVal, #pos(#s(#0))) [1]
right(@l) → right#1(@l) [1]
right#1(::(@x, @xs)) → @x [1]
right#1(nil) → #abs(#0) [1]
#add(#0, @y) → @y [0]
#add(#neg(#s(#0)), @y) → #pred(@y) [0]
#add(#neg(#s(#s(@x))), @y) → #pred(#add(#pos(#s(@x)), @y)) [0]
#add(#pos(#s(#0)), @y) → #succ(@y) [0]
#add(#pos(#s(#s(@x))), @y) → #succ(#add(#pos(#s(@x)), @y)) [0]
#and(#false, #false) → #false [0]
#and(#false, #true) → #false [0]
#and(#true, #false) → #false [0]
#and(#true, #true) → #true [0]
#ckgt(#EQ) → #false [0]
#ckgt(#GT) → #true [0]
#ckgt(#LT) → #false [0]
#compare(#0, #0) → #EQ [0]
#compare(#0, #neg(@y)) → #GT [0]
#compare(#0, #pos(@y)) → #LT [0]
#compare(#0, #s(@y)) → #LT [0]
#compare(#neg(@x), #0) → #LT [0]
#compare(#neg(@x), #neg(@y)) → #compare(@y, @x) [0]
#compare(#neg(@x), #pos(@y)) → #LT [0]
#compare(#pos(@x), #0) → #GT [0]
#compare(#pos(@x), #neg(@y)) → #GT [0]
#compare(#pos(@x), #pos(@y)) → #compare(@x, @y) [0]
#compare(#s(@x), #0) → #GT [0]
#compare(#s(@x), #s(@y)) → #compare(@x, @y) [0]
#eq(#0, #0) → #true [0]
#eq(#0, #neg(@y)) → #false [0]
#eq(#0, #pos(@y)) → #false [0]
#eq(#0, #s(@y)) → #false [0]
#eq(#neg(@x), #0) → #false [0]
#eq(#neg(@x), #neg(@y)) → #eq(@x, @y) [0]
#eq(#neg(@x), #pos(@y)) → #false [0]
#eq(#pos(@x), #0) → #false [0]
#eq(#pos(@x), #neg(@y)) → #false [0]
#eq(#pos(@x), #pos(@y)) → #eq(@x, @y) [0]
#eq(#s(@x), #0) → #false [0]
#eq(#s(@x), #s(@y)) → #eq(@x, @y) [0]
#eq(::(@x_1, @x_2), ::(@y_1, @y_2)) → #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) [0]
#eq(::(@x_1, @x_2), nil) → #false [0]
#eq(nil, ::(@y_1, @y_2)) → #false [0]
#eq(nil, nil) → #true [0]
#pred(#0) → #neg(#s(#0)) [0]
#pred(#neg(#s(@x))) → #neg(#s(#s(@x))) [0]
#pred(#pos(#s(#0))) → #0 [0]
#pred(#pos(#s(#s(@x)))) → #pos(#s(@x)) [0]
#succ(#0) → #pos(#s(#0)) [0]
#succ(#neg(#s(#0))) → #0 [0]
#succ(#neg(#s(#s(@x)))) → #neg(#s(@x)) [0]
#succ(#pos(#s(@x))) → #pos(#s(#s(@x))) [0]

Rewrite Strategy: INNERMOST

(3) CpxWeightedTrsRenamingProof (BOTH BOUNDS(ID, ID) transformation)

Renamed defined symbols to avoid conflicts with arithmetic symbols:

+ => plus

(4) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

#abs(#0) → #0 [1]
#abs(#neg(@x)) → #pos(@x) [1]
#abs(#pos(@x)) → #pos(@x) [1]
#abs(#s(@x)) → #pos(#s(@x)) [1]
#equal(@x, @y) → #eq(@x, @y) [1]
#greater(@x, @y) → #ckgt(#compare(@x, @y)) [1]
plus(@x, @y) → #add(@x, @y) [1]
firstline(@l) → firstline#1(@l) [1]
firstline#1(::(@x, @xs)) → ::(#abs(#0), firstline(@xs)) [1]
firstline#1(nil) → nil [1]
lcs(@l1, @l2) → lcs#1(lcstable(@l1, @l2)) [1]
lcs#1(@m) → lcs#2(@m) [1]
lcs#2(::(@l1, @_@2)) → lcs#3(@l1) [1]
lcs#2(nil) → #abs(#0) [1]
lcs#3(::(@len, @_@1)) → @len [1]
lcs#3(nil) → #abs(#0) [1]
lcstable(@l1, @l2) → lcstable#1(@l1, @l2) [1]
lcstable#1(::(@x, @xs), @l2) → lcstable#2(lcstable(@xs, @l2), @l2, @x) [1]
lcstable#1(nil, @l2) → ::(firstline(@l2), nil) [1]
lcstable#2(@m, @l2, @x) → lcstable#3(@m, @l2, @x) [1]
lcstable#3(::(@l, @ls), @l2, @x) → ::(newline(@x, @l, @l2), ::(@l, @ls)) [1]
lcstable#3(nil, @l2, @x) → nil [1]
max(@a, @b) → max#1(#greater(@a, @b), @a, @b) [1]
max#1(#false, @a, @b) → @b [1]
max#1(#true, @a, @b) → @a [1]
newline(@y, @lastline, @l) → newline#1(@l, @lastline, @y) [1]
newline#1(::(@x, @xs), @lastline, @y) → newline#2(@lastline, @x, @xs, @y) [1]
newline#1(nil, @lastline, @y) → nil [1]
newline#2(::(@belowVal, @lastline'), @x, @xs, @y) → newline#3(newline(@y, @lastline', @xs), @belowVal, @lastline', @x, @y) [1]
newline#2(nil, @x, @xs, @y) → nil [1]
newline#3(@nl, @belowVal, @lastline', @x, @y) → newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) [1]
newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) → newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) [1]
newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) → newline#6(newline#7(#equal(@x, @y), @belowVal, @diagVal, @rightVal), @nl) [1]
newline#6(@elem, @nl) → ::(@elem, @nl) [1]
newline#7(#false, @belowVal, @diagVal, @rightVal) → max(@belowVal, @rightVal) [1]
newline#7(#true, @belowVal, @diagVal, @rightVal) → plus(@diagVal, #pos(#s(#0))) [1]
right(@l) → right#1(@l) [1]
right#1(::(@x, @xs)) → @x [1]
right#1(nil) → #abs(#0) [1]
#add(#0, @y) → @y [0]
#add(#neg(#s(#0)), @y) → #pred(@y) [0]
#add(#neg(#s(#s(@x))), @y) → #pred(#add(#pos(#s(@x)), @y)) [0]
#add(#pos(#s(#0)), @y) → #succ(@y) [0]
#add(#pos(#s(#s(@x))), @y) → #succ(#add(#pos(#s(@x)), @y)) [0]
#and(#false, #false) → #false [0]
#and(#false, #true) → #false [0]
#and(#true, #false) → #false [0]
#and(#true, #true) → #true [0]
#ckgt(#EQ) → #false [0]
#ckgt(#GT) → #true [0]
#ckgt(#LT) → #false [0]
#compare(#0, #0) → #EQ [0]
#compare(#0, #neg(@y)) → #GT [0]
#compare(#0, #pos(@y)) → #LT [0]
#compare(#0, #s(@y)) → #LT [0]
#compare(#neg(@x), #0) → #LT [0]
#compare(#neg(@x), #neg(@y)) → #compare(@y, @x) [0]
#compare(#neg(@x), #pos(@y)) → #LT [0]
#compare(#pos(@x), #0) → #GT [0]
#compare(#pos(@x), #neg(@y)) → #GT [0]
#compare(#pos(@x), #pos(@y)) → #compare(@x, @y) [0]
#compare(#s(@x), #0) → #GT [0]
#compare(#s(@x), #s(@y)) → #compare(@x, @y) [0]
#eq(#0, #0) → #true [0]
#eq(#0, #neg(@y)) → #false [0]
#eq(#0, #pos(@y)) → #false [0]
#eq(#0, #s(@y)) → #false [0]
#eq(#neg(@x), #0) → #false [0]
#eq(#neg(@x), #neg(@y)) → #eq(@x, @y) [0]
#eq(#neg(@x), #pos(@y)) → #false [0]
#eq(#pos(@x), #0) → #false [0]
#eq(#pos(@x), #neg(@y)) → #false [0]
#eq(#pos(@x), #pos(@y)) → #eq(@x, @y) [0]
#eq(#s(@x), #0) → #false [0]
#eq(#s(@x), #s(@y)) → #eq(@x, @y) [0]
#eq(::(@x_1, @x_2), ::(@y_1, @y_2)) → #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) [0]
#eq(::(@x_1, @x_2), nil) → #false [0]
#eq(nil, ::(@y_1, @y_2)) → #false [0]
#eq(nil, nil) → #true [0]
#pred(#0) → #neg(#s(#0)) [0]
#pred(#neg(#s(@x))) → #neg(#s(#s(@x))) [0]
#pred(#pos(#s(#0))) → #0 [0]
#pred(#pos(#s(#s(@x)))) → #pos(#s(@x)) [0]
#succ(#0) → #pos(#s(#0)) [0]
#succ(#neg(#s(#0))) → #0 [0]
#succ(#neg(#s(#s(@x)))) → #neg(#s(@x)) [0]
#succ(#pos(#s(@x))) → #pos(#s(#s(@x))) [0]

Rewrite Strategy: INNERMOST

(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(6) Obligation:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

#abs(#0) → #0 [1]
#abs(#neg(@x)) → #pos(@x) [1]
#abs(#pos(@x)) → #pos(@x) [1]
#abs(#s(@x)) → #pos(#s(@x)) [1]
#equal(@x, @y) → #eq(@x, @y) [1]
#greater(@x, @y) → #ckgt(#compare(@x, @y)) [1]
plus(@x, @y) → #add(@x, @y) [1]
firstline(@l) → firstline#1(@l) [1]
firstline#1(::(@x, @xs)) → ::(#abs(#0), firstline(@xs)) [1]
firstline#1(nil) → nil [1]
lcs(@l1, @l2) → lcs#1(lcstable(@l1, @l2)) [1]
lcs#1(@m) → lcs#2(@m) [1]
lcs#2(::(@l1, @_@2)) → lcs#3(@l1) [1]
lcs#2(nil) → #abs(#0) [1]
lcs#3(::(@len, @_@1)) → @len [1]
lcs#3(nil) → #abs(#0) [1]
lcstable(@l1, @l2) → lcstable#1(@l1, @l2) [1]
lcstable#1(::(@x, @xs), @l2) → lcstable#2(lcstable(@xs, @l2), @l2, @x) [1]
lcstable#1(nil, @l2) → ::(firstline(@l2), nil) [1]
lcstable#2(@m, @l2, @x) → lcstable#3(@m, @l2, @x) [1]
lcstable#3(::(@l, @ls), @l2, @x) → ::(newline(@x, @l, @l2), ::(@l, @ls)) [1]
lcstable#3(nil, @l2, @x) → nil [1]
max(@a, @b) → max#1(#greater(@a, @b), @a, @b) [1]
max#1(#false, @a, @b) → @b [1]
max#1(#true, @a, @b) → @a [1]
newline(@y, @lastline, @l) → newline#1(@l, @lastline, @y) [1]
newline#1(::(@x, @xs), @lastline, @y) → newline#2(@lastline, @x, @xs, @y) [1]
newline#1(nil, @lastline, @y) → nil [1]
newline#2(::(@belowVal, @lastline'), @x, @xs, @y) → newline#3(newline(@y, @lastline', @xs), @belowVal, @lastline', @x, @y) [1]
newline#2(nil, @x, @xs, @y) → nil [1]
newline#3(@nl, @belowVal, @lastline', @x, @y) → newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) [1]
newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) → newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) [1]
newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) → newline#6(newline#7(#equal(@x, @y), @belowVal, @diagVal, @rightVal), @nl) [1]
newline#6(@elem, @nl) → ::(@elem, @nl) [1]
newline#7(#false, @belowVal, @diagVal, @rightVal) → max(@belowVal, @rightVal) [1]
newline#7(#true, @belowVal, @diagVal, @rightVal) → plus(@diagVal, #pos(#s(#0))) [1]
right(@l) → right#1(@l) [1]
right#1(::(@x, @xs)) → @x [1]
right#1(nil) → #abs(#0) [1]
#add(#0, @y) → @y [0]
#add(#neg(#s(#0)), @y) → #pred(@y) [0]
#add(#neg(#s(#s(@x))), @y) → #pred(#add(#pos(#s(@x)), @y)) [0]
#add(#pos(#s(#0)), @y) → #succ(@y) [0]
#add(#pos(#s(#s(@x))), @y) → #succ(#add(#pos(#s(@x)), @y)) [0]
#and(#false, #false) → #false [0]
#and(#false, #true) → #false [0]
#and(#true, #false) → #false [0]
#and(#true, #true) → #true [0]
#ckgt(#EQ) → #false [0]
#ckgt(#GT) → #true [0]
#ckgt(#LT) → #false [0]
#compare(#0, #0) → #EQ [0]
#compare(#0, #neg(@y)) → #GT [0]
#compare(#0, #pos(@y)) → #LT [0]
#compare(#0, #s(@y)) → #LT [0]
#compare(#neg(@x), #0) → #LT [0]
#compare(#neg(@x), #neg(@y)) → #compare(@y, @x) [0]
#compare(#neg(@x), #pos(@y)) → #LT [0]
#compare(#pos(@x), #0) → #GT [0]
#compare(#pos(@x), #neg(@y)) → #GT [0]
#compare(#pos(@x), #pos(@y)) → #compare(@x, @y) [0]
#compare(#s(@x), #0) → #GT [0]
#compare(#s(@x), #s(@y)) → #compare(@x, @y) [0]
#eq(#0, #0) → #true [0]
#eq(#0, #neg(@y)) → #false [0]
#eq(#0, #pos(@y)) → #false [0]
#eq(#0, #s(@y)) → #false [0]
#eq(#neg(@x), #0) → #false [0]
#eq(#neg(@x), #neg(@y)) → #eq(@x, @y) [0]
#eq(#neg(@x), #pos(@y)) → #false [0]
#eq(#pos(@x), #0) → #false [0]
#eq(#pos(@x), #neg(@y)) → #false [0]
#eq(#pos(@x), #pos(@y)) → #eq(@x, @y) [0]
#eq(#s(@x), #0) → #false [0]
#eq(#s(@x), #s(@y)) → #eq(@x, @y) [0]
#eq(::(@x_1, @x_2), ::(@y_1, @y_2)) → #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) [0]
#eq(::(@x_1, @x_2), nil) → #false [0]
#eq(nil, ::(@y_1, @y_2)) → #false [0]
#eq(nil, nil) → #true [0]
#pred(#0) → #neg(#s(#0)) [0]
#pred(#neg(#s(@x))) → #neg(#s(#s(@x))) [0]
#pred(#pos(#s(#0))) → #0 [0]
#pred(#pos(#s(#s(@x)))) → #pos(#s(@x)) [0]
#succ(#0) → #pos(#s(#0)) [0]
#succ(#neg(#s(#0))) → #0 [0]
#succ(#neg(#s(#s(@x)))) → #neg(#s(@x)) [0]
#succ(#pos(#s(@x))) → #pos(#s(#s(@x))) [0]

The TRS has the following type information:
#abs :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
#0 :: #0:#neg:#pos:#s::::nil
#neg :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
#pos :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
#s :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
#equal :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #false:#true
#eq :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #false:#true
#greater :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #false:#true
#ckgt :: #EQ:#GT:#LT → #false:#true
#compare :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #EQ:#GT:#LT
plus :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
#add :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
firstline :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
firstline#1 :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
:: :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
nil :: #0:#neg:#pos:#s::::nil
lcs :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
lcs#1 :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
lcstable :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
lcs#2 :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
lcs#3 :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
lcstable#1 :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
lcstable#2 :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
lcstable#3 :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
newline :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
max :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
max#1 :: #false:#true → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
#false :: #false:#true
#true :: #false:#true
newline#1 :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
newline#2 :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
newline#3 :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
newline#4 :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
right :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
newline#5 :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
newline#6 :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
newline#7 :: #false:#true → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
right#1 :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
#pred :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
#succ :: #0:#neg:#pos:#s::::nil → #0:#neg:#pos:#s::::nil
#and :: #false:#true → #false:#true → #false:#true
#EQ :: #EQ:#GT:#LT
#GT :: #EQ:#GT:#LT
#LT :: #EQ:#GT:#LT

Rewrite Strategy: INNERMOST

(7) CompletionProof (UPPER BOUND(ID) transformation)

The transformation into a RNTS is sound, since:

(a) The obligation is a constructor system where every type has a constant constructor,

(b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols:


lcs
lcs#1
lcs#2
lcs#3

(c) The following functions are completely defined:

lcstable
#greater
newline#7
#equal
right
newline
newline#1
plus
right#1
lcstable#1
firstline
#abs
firstline#1
newline#2
max
lcstable#2
max#1
newline#3
lcstable#3
newline#4
newline#5
newline#6
#add
#and
#ckgt
#compare
#eq
#pred
#succ

Due to the following rules being added:

#add(v0, v1) → null_#add [0]
#and(v0, v1) → null_#and [0]
#ckgt(v0) → null_#ckgt [0]
#compare(v0, v1) → null_#compare [0]
#eq(v0, v1) → null_#eq [0]
#pred(v0) → null_#pred [0]
#succ(v0) → null_#succ [0]
newline#7(v0, v1, v2, v3) → null_newline#7 [0]
newline#1(v0, v1, v2) → null_newline#1 [0]
right#1(v0) → null_right#1 [0]
lcstable#1(v0, v1) → null_lcstable#1 [0]
#abs(v0) → null_#abs [0]
firstline#1(v0) → null_firstline#1 [0]
newline#2(v0, v1, v2, v3) → null_newline#2 [0]
max#1(v0, v1, v2) → null_max#1 [0]
lcstable#3(v0, v1, v2) → null_lcstable#3 [0]

And the following fresh constants:

null_#add, null_#and, null_#ckgt, null_#compare, null_#eq, null_#pred, null_#succ, null_newline#7, null_newline#1, null_right#1, null_lcstable#1, null_#abs, null_firstline#1, null_newline#2, null_max#1, null_lcstable#3

(8) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

#abs(#0) → #0 [1]
#abs(#neg(@x)) → #pos(@x) [1]
#abs(#pos(@x)) → #pos(@x) [1]
#abs(#s(@x)) → #pos(#s(@x)) [1]
#equal(@x, @y) → #eq(@x, @y) [1]
#greater(@x, @y) → #ckgt(#compare(@x, @y)) [1]
plus(@x, @y) → #add(@x, @y) [1]
firstline(@l) → firstline#1(@l) [1]
firstline#1(::(@x, @xs)) → ::(#abs(#0), firstline(@xs)) [1]
firstline#1(nil) → nil [1]
lcs(@l1, @l2) → lcs#1(lcstable(@l1, @l2)) [1]
lcs#1(@m) → lcs#2(@m) [1]
lcs#2(::(@l1, @_@2)) → lcs#3(@l1) [1]
lcs#2(nil) → #abs(#0) [1]
lcs#3(::(@len, @_@1)) → @len [1]
lcs#3(nil) → #abs(#0) [1]
lcstable(@l1, @l2) → lcstable#1(@l1, @l2) [1]
lcstable#1(::(@x, @xs), @l2) → lcstable#2(lcstable(@xs, @l2), @l2, @x) [1]
lcstable#1(nil, @l2) → ::(firstline(@l2), nil) [1]
lcstable#2(@m, @l2, @x) → lcstable#3(@m, @l2, @x) [1]
lcstable#3(::(@l, @ls), @l2, @x) → ::(newline(@x, @l, @l2), ::(@l, @ls)) [1]
lcstable#3(nil, @l2, @x) → nil [1]
max(@a, @b) → max#1(#greater(@a, @b), @a, @b) [1]
max#1(#false, @a, @b) → @b [1]
max#1(#true, @a, @b) → @a [1]
newline(@y, @lastline, @l) → newline#1(@l, @lastline, @y) [1]
newline#1(::(@x, @xs), @lastline, @y) → newline#2(@lastline, @x, @xs, @y) [1]
newline#1(nil, @lastline, @y) → nil [1]
newline#2(::(@belowVal, @lastline'), @x, @xs, @y) → newline#3(newline(@y, @lastline', @xs), @belowVal, @lastline', @x, @y) [1]
newline#2(nil, @x, @xs, @y) → nil [1]
newline#3(@nl, @belowVal, @lastline', @x, @y) → newline#4(right(@nl), @belowVal, @lastline', @nl, @x, @y) [1]
newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) → newline#5(right(@lastline'), @belowVal, @nl, @rightVal, @x, @y) [1]
newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) → newline#6(newline#7(#equal(@x, @y), @belowVal, @diagVal, @rightVal), @nl) [1]
newline#6(@elem, @nl) → ::(@elem, @nl) [1]
newline#7(#false, @belowVal, @diagVal, @rightVal) → max(@belowVal, @rightVal) [1]
newline#7(#true, @belowVal, @diagVal, @rightVal) → plus(@diagVal, #pos(#s(#0))) [1]
right(@l) → right#1(@l) [1]
right#1(::(@x, @xs)) → @x [1]
right#1(nil) → #abs(#0) [1]
#add(#0, @y) → @y [0]
#add(#neg(#s(#0)), @y) → #pred(@y) [0]
#add(#neg(#s(#s(@x))), @y) → #pred(#add(#pos(#s(@x)), @y)) [0]
#add(#pos(#s(#0)), @y) → #succ(@y) [0]
#add(#pos(#s(#s(@x))), @y) → #succ(#add(#pos(#s(@x)), @y)) [0]
#and(#false, #false) → #false [0]
#and(#false, #true) → #false [0]
#and(#true, #false) → #false [0]
#and(#true, #true) → #true [0]
#ckgt(#EQ) → #false [0]
#ckgt(#GT) → #true [0]
#ckgt(#LT) → #false [0]
#compare(#0, #0) → #EQ [0]
#compare(#0, #neg(@y)) → #GT [0]
#compare(#0, #pos(@y)) → #LT [0]
#compare(#0, #s(@y)) → #LT [0]
#compare(#neg(@x), #0) → #LT [0]
#compare(#neg(@x), #neg(@y)) → #compare(@y, @x) [0]
#compare(#neg(@x), #pos(@y)) → #LT [0]
#compare(#pos(@x), #0) → #GT [0]
#compare(#pos(@x), #neg(@y)) → #GT [0]
#compare(#pos(@x), #pos(@y)) → #compare(@x, @y) [0]
#compare(#s(@x), #0) → #GT [0]
#compare(#s(@x), #s(@y)) → #compare(@x, @y) [0]
#eq(#0, #0) → #true [0]
#eq(#0, #neg(@y)) → #false [0]
#eq(#0, #pos(@y)) → #false [0]
#eq(#0, #s(@y)) → #false [0]
#eq(#neg(@x), #0) → #false [0]
#eq(#neg(@x), #neg(@y)) → #eq(@x, @y) [0]
#eq(#neg(@x), #pos(@y)) → #false [0]
#eq(#pos(@x), #0) → #false [0]
#eq(#pos(@x), #neg(@y)) → #false [0]
#eq(#pos(@x), #pos(@y)) → #eq(@x, @y) [0]
#eq(#s(@x), #0) → #false [0]
#eq(#s(@x), #s(@y)) → #eq(@x, @y) [0]
#eq(::(@x_1, @x_2), ::(@y_1, @y_2)) → #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) [0]
#eq(::(@x_1, @x_2), nil) → #false [0]
#eq(nil, ::(@y_1, @y_2)) → #false [0]
#eq(nil, nil) → #true [0]
#pred(#0) → #neg(#s(#0)) [0]
#pred(#neg(#s(@x))) → #neg(#s(#s(@x))) [0]
#pred(#pos(#s(#0))) → #0 [0]
#pred(#pos(#s(#s(@x)))) → #pos(#s(@x)) [0]
#succ(#0) → #pos(#s(#0)) [0]
#succ(#neg(#s(#0))) → #0 [0]
#succ(#neg(#s(#s(@x)))) → #neg(#s(@x)) [0]
#succ(#pos(#s(@x))) → #pos(#s(#s(@x))) [0]
#add(v0, v1) → null_#add [0]
#and(v0, v1) → null_#and [0]
#ckgt(v0) → null_#ckgt [0]
#compare(v0, v1) → null_#compare [0]
#eq(v0, v1) → null_#eq [0]
#pred(v0) → null_#pred [0]
#succ(v0) → null_#succ [0]
newline#7(v0, v1, v2, v3) → null_newline#7 [0]
newline#1(v0, v1, v2) → null_newline#1 [0]
right#1(v0) → null_right#1 [0]
lcstable#1(v0, v1) → null_lcstable#1 [0]
#abs(v0) → null_#abs [0]
firstline#1(v0) → null_firstline#1 [0]
newline#2(v0, v1, v2, v3) → null_newline#2 [0]
max#1(v0, v1, v2) → null_max#1 [0]
lcstable#3(v0, v1, v2) → null_lcstable#3 [0]

The TRS has the following type information:
#abs :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
#0 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
#neg :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
#pos :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
#s :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
#equal :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #false:#true:null_#and:null_#ckgt:null_#eq
#eq :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #false:#true:null_#and:null_#ckgt:null_#eq
#greater :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #false:#true:null_#and:null_#ckgt:null_#eq
#ckgt :: #EQ:#GT:#LT:null_#compare → #false:#true:null_#and:null_#ckgt:null_#eq
#compare :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #EQ:#GT:#LT:null_#compare
plus :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
#add :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
firstline :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
firstline#1 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
:: :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
nil :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
lcs :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
lcs#1 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
lcstable :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
lcs#2 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
lcs#3 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
lcstable#1 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
lcstable#2 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
lcstable#3 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
newline :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
max :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
max#1 :: #false:#true:null_#and:null_#ckgt:null_#eq → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
#false :: #false:#true:null_#and:null_#ckgt:null_#eq
#true :: #false:#true:null_#and:null_#ckgt:null_#eq
newline#1 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
newline#2 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
newline#3 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
newline#4 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
right :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
newline#5 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
newline#6 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
newline#7 :: #false:#true:null_#and:null_#ckgt:null_#eq → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
right#1 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
#pred :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
#succ :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
#and :: #false:#true:null_#and:null_#ckgt:null_#eq → #false:#true:null_#and:null_#ckgt:null_#eq → #false:#true:null_#and:null_#ckgt:null_#eq
#EQ :: #EQ:#GT:#LT:null_#compare
#GT :: #EQ:#GT:#LT:null_#compare
#LT :: #EQ:#GT:#LT:null_#compare
null_#add :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
null_#and :: #false:#true:null_#and:null_#ckgt:null_#eq
null_#ckgt :: #false:#true:null_#and:null_#ckgt:null_#eq
null_#compare :: #EQ:#GT:#LT:null_#compare
null_#eq :: #false:#true:null_#and:null_#ckgt:null_#eq
null_#pred :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
null_#succ :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
null_newline#7 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
null_newline#1 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
null_right#1 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
null_lcstable#1 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
null_#abs :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
null_firstline#1 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
null_newline#2 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
null_max#1 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
null_lcstable#3 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3

Rewrite Strategy: INNERMOST

(9) NarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Narrowed the inner basic terms of all right-hand sides by a single narrowing step.

(10) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

#abs(#0) → #0 [1]
#abs(#neg(@x)) → #pos(@x) [1]
#abs(#pos(@x)) → #pos(@x) [1]
#abs(#s(@x)) → #pos(#s(@x)) [1]
#equal(@x, @y) → #eq(@x, @y) [1]
#greater(#0, #0) → #ckgt(#EQ) [1]
#greater(#0, #neg(@y')) → #ckgt(#GT) [1]
#greater(#0, #pos(@y'')) → #ckgt(#LT) [1]
#greater(#0, #s(@y1)) → #ckgt(#LT) [1]
#greater(#neg(@x'), #0) → #ckgt(#LT) [1]
#greater(#neg(@x''), #neg(@y2)) → #ckgt(#compare(@y2, @x'')) [1]
#greater(#neg(@x1), #pos(@y3)) → #ckgt(#LT) [1]
#greater(#pos(@x2), #0) → #ckgt(#GT) [1]
#greater(#pos(@x3), #neg(@y4)) → #ckgt(#GT) [1]
#greater(#pos(@x4), #pos(@y5)) → #ckgt(#compare(@x4, @y5)) [1]
#greater(#s(@x5), #0) → #ckgt(#GT) [1]
#greater(#s(@x6), #s(@y6)) → #ckgt(#compare(@x6, @y6)) [1]
#greater(@x, @y) → #ckgt(null_#compare) [1]
plus(@x, @y) → #add(@x, @y) [1]
firstline(@l) → firstline#1(@l) [1]
firstline#1(::(@x, @xs)) → ::(#abs(#0), firstline(@xs)) [1]
firstline#1(nil) → nil [1]
lcs(@l1, @l2) → lcs#1(lcstable#1(@l1, @l2)) [2]
lcs#1(@m) → lcs#2(@m) [1]
lcs#2(::(@l1, @_@2)) → lcs#3(@l1) [1]
lcs#2(nil) → #abs(#0) [1]
lcs#3(::(@len, @_@1)) → @len [1]
lcs#3(nil) → #abs(#0) [1]
lcstable(@l1, @l2) → lcstable#1(@l1, @l2) [1]
lcstable#1(::(@x, @xs), @l2) → lcstable#2(lcstable#1(@xs, @l2), @l2, @x) [2]
lcstable#1(nil, @l2) → ::(firstline(@l2), nil) [1]
lcstable#2(@m, @l2, @x) → lcstable#3(@m, @l2, @x) [1]
lcstable#3(::(@l, @ls), @l2, @x) → ::(newline(@x, @l, @l2), ::(@l, @ls)) [1]
lcstable#3(nil, @l2, @x) → nil [1]
max(@a, @b) → max#1(#ckgt(#compare(@a, @b)), @a, @b) [2]
max#1(#false, @a, @b) → @b [1]
max#1(#true, @a, @b) → @a [1]
newline(@y, @lastline, @l) → newline#1(@l, @lastline, @y) [1]
newline#1(::(@x, @xs), @lastline, @y) → newline#2(@lastline, @x, @xs, @y) [1]
newline#1(nil, @lastline, @y) → nil [1]
newline#2(::(@belowVal, @lastline'), @x, @xs, @y) → newline#3(newline#1(@xs, @lastline', @y), @belowVal, @lastline', @x, @y) [2]
newline#2(nil, @x, @xs, @y) → nil [1]
newline#3(@nl, @belowVal, @lastline', @x, @y) → newline#4(right#1(@nl), @belowVal, @lastline', @nl, @x, @y) [2]
newline#4(@rightVal, @belowVal, @lastline', @nl, @x, @y) → newline#5(right#1(@lastline'), @belowVal, @nl, @rightVal, @x, @y) [2]
newline#5(@diagVal, @belowVal, @nl, @rightVal, @x, @y) → newline#6(newline#7(#eq(@x, @y), @belowVal, @diagVal, @rightVal), @nl) [2]
newline#6(@elem, @nl) → ::(@elem, @nl) [1]
newline#7(#false, @belowVal, @diagVal, @rightVal) → max(@belowVal, @rightVal) [1]
newline#7(#true, @belowVal, @diagVal, @rightVal) → plus(@diagVal, #pos(#s(#0))) [1]
right(@l) → right#1(@l) [1]
right#1(::(@x, @xs)) → @x [1]
right#1(nil) → #abs(#0) [1]
#add(#0, @y) → @y [0]
#add(#neg(#s(#0)), @y) → #pred(@y) [0]
#add(#neg(#s(#s(#0))), @y) → #pred(#succ(@y)) [0]
#add(#neg(#s(#s(#s(@x7)))), @y) → #pred(#succ(#add(#pos(#s(@x7)), @y))) [0]
#add(#neg(#s(#s(@x))), @y) → #pred(null_#add) [0]
#add(#pos(#s(#0)), @y) → #succ(@y) [0]
#add(#pos(#s(#s(#0))), @y) → #succ(#succ(@y)) [0]
#add(#pos(#s(#s(#s(@x8)))), @y) → #succ(#succ(#add(#pos(#s(@x8)), @y))) [0]
#add(#pos(#s(#s(@x))), @y) → #succ(null_#add) [0]
#and(#false, #false) → #false [0]
#and(#false, #true) → #false [0]
#and(#true, #false) → #false [0]
#and(#true, #true) → #true [0]
#ckgt(#EQ) → #false [0]
#ckgt(#GT) → #true [0]
#ckgt(#LT) → #false [0]
#compare(#0, #0) → #EQ [0]
#compare(#0, #neg(@y)) → #GT [0]
#compare(#0, #pos(@y)) → #LT [0]
#compare(#0, #s(@y)) → #LT [0]
#compare(#neg(@x), #0) → #LT [0]
#compare(#neg(@x), #neg(@y)) → #compare(@y, @x) [0]
#compare(#neg(@x), #pos(@y)) → #LT [0]
#compare(#pos(@x), #0) → #GT [0]
#compare(#pos(@x), #neg(@y)) → #GT [0]
#compare(#pos(@x), #pos(@y)) → #compare(@x, @y) [0]
#compare(#s(@x), #0) → #GT [0]
#compare(#s(@x), #s(@y)) → #compare(@x, @y) [0]
#eq(#0, #0) → #true [0]
#eq(#0, #neg(@y)) → #false [0]
#eq(#0, #pos(@y)) → #false [0]
#eq(#0, #s(@y)) → #false [0]
#eq(#neg(@x), #0) → #false [0]
#eq(#neg(@x), #neg(@y)) → #eq(@x, @y) [0]
#eq(#neg(@x), #pos(@y)) → #false [0]
#eq(#pos(@x), #0) → #false [0]
#eq(#pos(@x), #neg(@y)) → #false [0]
#eq(#pos(@x), #pos(@y)) → #eq(@x, @y) [0]
#eq(#s(@x), #0) → #false [0]
#eq(#s(@x), #s(@y)) → #eq(@x, @y) [0]
#eq(::(@x_1, @x_2), ::(@y_1, @y_2)) → #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) [0]
#eq(::(@x_1, @x_2), nil) → #false [0]
#eq(nil, ::(@y_1, @y_2)) → #false [0]
#eq(nil, nil) → #true [0]
#pred(#0) → #neg(#s(#0)) [0]
#pred(#neg(#s(@x))) → #neg(#s(#s(@x))) [0]
#pred(#pos(#s(#0))) → #0 [0]
#pred(#pos(#s(#s(@x)))) → #pos(#s(@x)) [0]
#succ(#0) → #pos(#s(#0)) [0]
#succ(#neg(#s(#0))) → #0 [0]
#succ(#neg(#s(#s(@x)))) → #neg(#s(@x)) [0]
#succ(#pos(#s(@x))) → #pos(#s(#s(@x))) [0]
#add(v0, v1) → null_#add [0]
#and(v0, v1) → null_#and [0]
#ckgt(v0) → null_#ckgt [0]
#compare(v0, v1) → null_#compare [0]
#eq(v0, v1) → null_#eq [0]
#pred(v0) → null_#pred [0]
#succ(v0) → null_#succ [0]
newline#7(v0, v1, v2, v3) → null_newline#7 [0]
newline#1(v0, v1, v2) → null_newline#1 [0]
right#1(v0) → null_right#1 [0]
lcstable#1(v0, v1) → null_lcstable#1 [0]
#abs(v0) → null_#abs [0]
firstline#1(v0) → null_firstline#1 [0]
newline#2(v0, v1, v2, v3) → null_newline#2 [0]
max#1(v0, v1, v2) → null_max#1 [0]
lcstable#3(v0, v1, v2) → null_lcstable#3 [0]

The TRS has the following type information:
#abs :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
#0 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
#neg :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
#pos :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
#s :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
#equal :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #false:#true:null_#and:null_#ckgt:null_#eq
#eq :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #false:#true:null_#and:null_#ckgt:null_#eq
#greater :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #false:#true:null_#and:null_#ckgt:null_#eq
#ckgt :: #EQ:#GT:#LT:null_#compare → #false:#true:null_#and:null_#ckgt:null_#eq
#compare :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #EQ:#GT:#LT:null_#compare
plus :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
#add :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
firstline :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
firstline#1 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
:: :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
nil :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
lcs :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
lcs#1 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
lcstable :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
lcs#2 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
lcs#3 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
lcstable#1 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
lcstable#2 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
lcstable#3 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
newline :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
max :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
max#1 :: #false:#true:null_#and:null_#ckgt:null_#eq → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
#false :: #false:#true:null_#and:null_#ckgt:null_#eq
#true :: #false:#true:null_#and:null_#ckgt:null_#eq
newline#1 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
newline#2 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
newline#3 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
newline#4 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
right :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
newline#5 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
newline#6 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
newline#7 :: #false:#true:null_#and:null_#ckgt:null_#eq → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
right#1 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
#pred :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
#succ :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3 → #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
#and :: #false:#true:null_#and:null_#ckgt:null_#eq → #false:#true:null_#and:null_#ckgt:null_#eq → #false:#true:null_#and:null_#ckgt:null_#eq
#EQ :: #EQ:#GT:#LT:null_#compare
#GT :: #EQ:#GT:#LT:null_#compare
#LT :: #EQ:#GT:#LT:null_#compare
null_#add :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
null_#and :: #false:#true:null_#and:null_#ckgt:null_#eq
null_#ckgt :: #false:#true:null_#and:null_#ckgt:null_#eq
null_#compare :: #EQ:#GT:#LT:null_#compare
null_#eq :: #false:#true:null_#and:null_#ckgt:null_#eq
null_#pred :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
null_#succ :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
null_newline#7 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
null_newline#1 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
null_right#1 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
null_lcstable#1 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
null_#abs :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
null_firstline#1 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
null_newline#2 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
null_max#1 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3
null_lcstable#3 :: #0:#neg:#pos:#s::::nil:null_#add:null_#pred:null_#succ:null_newline#7:null_newline#1:null_right#1:null_lcstable#1:null_#abs:null_firstline#1:null_newline#2:null_max#1:null_lcstable#3

Rewrite Strategy: INNERMOST

(11) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID) transformation)

Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction.
The constant constructors are abstracted as follows:

#0 => 0
nil => 1
#false => 1
#true => 2
#EQ => 1
#GT => 2
#LT => 3
null_#add => 0
null_#and => 0
null_#ckgt => 0
null_#compare => 0
null_#eq => 0
null_#pred => 0
null_#succ => 0
null_newline#7 => 0
null_newline#1 => 0
null_right#1 => 0
null_lcstable#1 => 0
null_#abs => 0
null_firstline#1 => 0
null_newline#2 => 0
null_max#1 => 0
null_lcstable#3 => 0

(12) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
#abs(z) -{ 1 }→ 1 + @x :|: @x >= 0, z = 1 + @x
#abs(z) -{ 1 }→ 1 + (1 + @x) :|: @x >= 0, z = 1 + @x
#add(z, z') -{ 0 }→ @y :|: z' = @y, z = 0, @y >= 0
#add(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#add(z, z') -{ 0 }→ #succ(@y) :|: z = 1 + (1 + 0), z' = @y, @y >= 0
#add(z, z') -{ 0 }→ #succ(0) :|: @x >= 0, z' = @y, z = 1 + (1 + (1 + @x)), @y >= 0
#add(z, z') -{ 0 }→ #succ(#succ(@y)) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + @x8), @y))) :|: z = 1 + (1 + (1 + (1 + @x8))), @x8 >= 0, z' = @y, @y >= 0
#add(z, z') -{ 0 }→ #pred(@y) :|: z = 1 + (1 + 0), z' = @y, @y >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: @x >= 0, z' = @y, z = 1 + (1 + (1 + @x)), @y >= 0
#add(z, z') -{ 0 }→ #pred(#succ(@y)) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + @x7), @y))) :|: z' = @y, z = 1 + (1 + (1 + (1 + @x7))), @x7 >= 0, @y >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' = 1 + @y, @y >= 0
#compare(z, z') -{ 0 }→ 3 :|: @x >= 0, z = 1 + @x, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' = 1 + @y, @y >= 0
#compare(z, z') -{ 0 }→ 2 :|: @x >= 0, z = 1 + @x, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#compare(z, z') -{ 0 }→ #compare(@x, @y) :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#compare(z, z') -{ 0 }→ #compare(@y, @x) :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x >= 0, z = 1 + @x, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#eq(z, z') -{ 0 }→ #eq(@x, @y) :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(@x, @y) :|: z = @x, @x >= 0, z' = @y, @y >= 0
#greater(z, z') -{ 1 }→ #ckgt(3) :|: z' = 1 + @y'', @y'' >= 0, z = 0
#greater(z, z') -{ 1 }→ #ckgt(3) :|: z' = 1 + @y1, @y1 >= 0, z = 0
#greater(z, z') -{ 1 }→ #ckgt(3) :|: z = 1 + @x', @x' >= 0, z' = 0
#greater(z, z') -{ 1 }→ #ckgt(3) :|: @y3 >= 0, @x1 >= 0, z' = 1 + @y3, z = 1 + @x1
#greater(z, z') -{ 1 }→ #ckgt(2) :|: @y' >= 0, z' = 1 + @y', z = 0
#greater(z, z') -{ 1 }→ #ckgt(2) :|: @x2 >= 0, z = 1 + @x2, z' = 0
#greater(z, z') -{ 1 }→ #ckgt(2) :|: @x3 >= 0, z' = 1 + @y4, z = 1 + @x3, @y4 >= 0
#greater(z, z') -{ 1 }→ #ckgt(2) :|: z = 1 + @x5, @x5 >= 0, z' = 0
#greater(z, z') -{ 1 }→ #ckgt(1) :|: z = 0, z' = 0
#greater(z, z') -{ 1 }→ #ckgt(0) :|: z = @x, @x >= 0, z' = @y, @y >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(@x4, @y5)) :|: z' = 1 + @y5, @y5 >= 0, z = 1 + @x4, @x4 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(@x6, @y6)) :|: z = 1 + @x6, z' = 1 + @y6, @x6 >= 0, @y6 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(@y2, @x'')) :|: z = 1 + @x'', z' = 1 + @y2, @y2 >= 0, @x'' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
#pred(z) -{ 0 }→ 1 + (1 + @x) :|: @x >= 0, z = 1 + (1 + (1 + @x))
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + @x)) :|: @x >= 0, z = 1 + (1 + @x)
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
#succ(z) -{ 0 }→ 1 + (1 + @x) :|: @x >= 0, z = 1 + (1 + (1 + @x))
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + @x)) :|: @x >= 0, z = 1 + (1 + @x)
firstline(z) -{ 1 }→ firstline#1(@l) :|: z = @l, @l >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
firstline#1(z) -{ 1 }→ 1 + #abs(0) + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(@l1, @l2)) :|: @l1 >= 0, z' = @l2, @l2 >= 0, z = @l1
lcs#1(z) -{ 1 }→ lcs#2(@m) :|: @m >= 0, z = @m
lcs#2(z) -{ 1 }→ lcs#3(@l1) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0
lcs#2(z) -{ 1 }→ #abs(0) :|: z = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 1 }→ #abs(0) :|: z = 1
lcstable(z, z') -{ 1 }→ lcstable#1(@l1, @l2) :|: @l1 >= 0, z' = @l2, @l2 >= 0, z = @l1
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, @l2), @l2, @x) :|: z' = @l2, @x >= 0, z = 1 + @x + @xs, @l2 >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
lcstable#1(z, z') -{ 1 }→ 1 + firstline(@l2) + 1 :|: z' = @l2, z = 1, @l2 >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(@m, @l2, @x) :|: @m >= 0, z' = @l2, @x >= 0, @l2 >= 0, z = @m, z'' = @x
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z' = @l2, @x >= 0, z = 1, @l2 >= 0, z'' = @x
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(@x, @l, @l2) + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z' = @l2, @x >= 0, @l2 >= 0, z'' = @x
max(z, z') -{ 2 }→ max#1(#ckgt(#compare(@a, @b)), @a, @b) :|: @a >= 0, z = @a, z' = @b, @b >= 0
max#1(z, z', z'') -{ 1 }→ @a :|: z = 2, @a >= 0, z' = @a, @b >= 0, z'' = @b
max#1(z, z', z'') -{ 1 }→ @b :|: @a >= 0, z = 1, z' = @a, @b >= 0, z'' = @b
max#1(z, z', z'') -{ 0 }→ 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0
newline(z, z', z'') -{ 1 }→ newline#1(@l, @lastline, @y) :|: @l >= 0, z'' = @l, @lastline >= 0, z' = @lastline, z = @y, @y >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(@lastline, @x, @xs, @y) :|: @x >= 0, z = 1 + @x + @xs, @lastline >= 0, z' = @lastline, @xs >= 0, @y >= 0, z'' = @y
newline#1(z, z', z'') -{ 1 }→ 1 :|: @lastline >= 0, z = 1, z' = @lastline, @y >= 0, z'' = @y
newline#1(z, z', z'') -{ 0 }→ 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(@xs, @lastline', @y), @belowVal, @lastline', @x, @y) :|: @lastline' >= 0, @x >= 0, z1 = @y, z = 1 + @belowVal + @lastline', @xs >= 0, @y >= 0, z' = @x, z'' = @xs, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: @x >= 0, z = 1, z1 = @y, @xs >= 0, @y >= 0, z' = @x, z'' = @xs
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z1 = v3, v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0, v3 >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(right#1(@nl), @belowVal, @lastline', @nl, @x, @y) :|: z'' = @lastline', z1 = @x, @lastline' >= 0, @x >= 0, z = @nl, z2 = @y, z' = @belowVal, @y >= 0, @nl >= 0, @belowVal >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(right#1(@lastline'), @belowVal, @nl, @rightVal, @x, @y) :|: z'' = @lastline', @lastline' >= 0, @x >= 0, @rightVal >= 0, z1 = @nl, z2 = @x, z = @rightVal, z' = @belowVal, z3 = @y, @y >= 0, @belowVal >= 0, @nl >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(@x, @y), @belowVal, @diagVal, @rightVal), @nl) :|: z = @diagVal, @x >= 0, @rightVal >= 0, z2 = @x, z' = @belowVal, z3 = @y, z'' = @nl, z1 = @rightVal, @diagVal >= 0, @y >= 0, @belowVal >= 0, @nl >= 0
newline#6(z, z') -{ 1 }→ 1 + @elem + @nl :|: @elem >= 0, z' = @nl, @nl >= 0, z = @elem
newline#7(z, z', z'', z1) -{ 1 }→ plus(@diagVal, 1 + (1 + 0)) :|: z = 2, @rightVal >= 0, z' = @belowVal, z1 = @rightVal, @diagVal >= 0, z'' = @diagVal, @belowVal >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(@belowVal, @rightVal) :|: @rightVal >= 0, z = 1, z' = @belowVal, z1 = @rightVal, @diagVal >= 0, z'' = @diagVal, @belowVal >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z1 = v3, v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0, v3 >= 0
plus(z, z') -{ 1 }→ #add(@x, @y) :|: z = @x, @x >= 0, z' = @y, @y >= 0
right(z) -{ 1 }→ right#1(@l) :|: z = @l, @l >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
right#1(z) -{ 1 }→ #abs(0) :|: z = 1

(13) InliningProof (UPPER BOUND(ID) transformation)

Inlined the following terminating rules on right-hand sides where appropriate:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + @x :|: @x >= 0, z = 1 + @x
#abs(z) -{ 1 }→ 1 + (1 + @x) :|: @x >= 0, z = 1 + @x
#abs(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
max#1(z, z', z'') -{ 1 }→ @b :|: @a >= 0, z = 1, z' = @a, @b >= 0, z'' = @b
max#1(z, z', z'') -{ 1 }→ @a :|: z = 2, @a >= 0, z' = @a, @b >= 0, z'' = @b
max#1(z, z', z'') -{ 0 }→ 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0
newline#6(z, z') -{ 1 }→ 1 + @elem + @nl :|: @elem >= 0, z' = @nl, @nl >= 0, z = @elem
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + @x)) :|: @x >= 0, z = 1 + (1 + @x)
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 1 + (1 + @x) :|: @x >= 0, z = 1 + (1 + (1 + @x))
#pred(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 1 + (1 + @x) :|: @x >= 0, z = 1 + (1 + (1 + @x))
#succ(z) -{ 0 }→ 1 + (1 + (1 + @x)) :|: @x >= 0, z = 1 + (1 + @x)
#succ(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 1 }→ #abs(0) :|: z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 1 }→ #abs(0) :|: z = 1
right#1(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0

(14) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
#abs(z) -{ 1 }→ 1 + @x :|: @x >= 0, z = 1 + @x
#abs(z) -{ 1 }→ 1 + (1 + @x) :|: @x >= 0, z = 1 + @x
#add(z, z') -{ 0 }→ @y :|: z' = @y, z = 0, @y >= 0
#add(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' = @y, @y >= 0, @y = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' = @y, @y >= 0, v0 >= 0, @y = v0
#add(z, z') -{ 0 }→ 0 :|: @x >= 0, z' = @y, z = 1 + (1 + (1 + @x)), @y >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @y = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @y = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @y = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @x >= 0, @y = 1 + (1 + (1 + @x)), 1 + (1 + @x) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @x >= 0, @y = 1 + (1 + (1 + @x)), v0 >= 0, 1 + (1 + @x) = v0
#add(z, z') -{ 0 }→ 0 :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @x >= 0, @y = 1 + (1 + @x), v0 >= 0, 1 + (1 + (1 + @x)) = v0
#add(z, z') -{ 0 }→ 0 :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, v0 >= 0, @y = v0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x) :|: z = 1 + (1 + 0), z' = @y, @y >= 0, @x >= 0, @y = 1 + (1 + (1 + @x))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @x >= 0, @y = 1 + (1 + (1 + @x)), @x' >= 0, 1 + (1 + @x) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @x >= 0, @y = 1 + (1 + @x), @x' >= 0, 1 + (1 + (1 + @x)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' = @y, @y >= 0, @y = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: @x >= 0, z' = @y, z = 1 + (1 + (1 + @x)), @y >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @y = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, v0 >= 0, @y = v0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + 0), z' = @y, @y >= 0, @x >= 0, @y = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @y = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @x >= 0, @y = 1 + (1 + (1 + @x)), @x' >= 0, 1 + (1 + @x) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @x >= 0, @y = 1 + (1 + @x), @x' >= 0, 1 + (1 + (1 + @x)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + @x8), @y))) :|: z = 1 + (1 + (1 + (1 + @x8))), @x8 >= 0, z' = @y, @y >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @y = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, v0 >= 0, @y = v0
#add(z, z') -{ 0 }→ #pred(1 + (1 + @x)) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @x >= 0, @y = 1 + (1 + (1 + @x))
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @y = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + @x))) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @x >= 0, @y = 1 + (1 + @x)
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + @x7), @y))) :|: z' = @y, z = 1 + (1 + (1 + (1 + @x7))), @x7 >= 0, @y >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' = 1 + @y, @y >= 0
#compare(z, z') -{ 0 }→ 3 :|: @x >= 0, z = 1 + @x, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' = 1 + @y, @y >= 0
#compare(z, z') -{ 0 }→ 2 :|: @x >= 0, z = 1 + @x, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#compare(z, z') -{ 0 }→ #compare(@x, @y) :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#compare(z, z') -{ 0 }→ #compare(@y, @x) :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x >= 0, z = 1 + @x, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#eq(z, z') -{ 0 }→ #eq(@x, @y) :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(@x, @y) :|: z = @x, @x >= 0, z' = @y, @y >= 0
#greater(z, z') -{ 1 }→ 2 :|: @y' >= 0, z' = 1 + @y', z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: @x2 >= 0, z = 1 + @x2, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: @x3 >= 0, z' = 1 + @y4, z = 1 + @x3, @y4 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z = 1 + @x5, @x5 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' = 1 + @y'', @y'' >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' = 1 + @y1, @y1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z = 1 + @x', @x' >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: @y3 >= 0, @x1 >= 0, z' = 1 + @y3, z = 1 + @x1, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: @y' >= 0, z' = 1 + @y', z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' = 1 + @y'', @y'' >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' = 1 + @y1, @y1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z = 1 + @x', @x' >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: @y3 >= 0, @x1 >= 0, z' = 1 + @y3, z = 1 + @x1, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: @x2 >= 0, z = 1 + @x2, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: @x3 >= 0, z' = 1 + @y4, z = 1 + @x3, @y4 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z = 1 + @x5, @x5 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z = @x, @x >= 0, z' = @y, @y >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(#compare(@x4, @y5)) :|: z' = 1 + @y5, @y5 >= 0, z = 1 + @x4, @x4 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(@x6, @y6)) :|: z = 1 + @x6, z' = 1 + @y6, @x6 >= 0, @y6 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(@y2, @x'')) :|: z = 1 + @x'', z' = 1 + @y2, @y2 >= 0, @x'' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
#pred(z) -{ 0 }→ 1 + (1 + @x) :|: @x >= 0, z = 1 + (1 + (1 + @x))
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + @x)) :|: @x >= 0, z = 1 + (1 + @x)
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
#succ(z) -{ 0 }→ 1 + (1 + @x) :|: @x >= 0, z = 1 + (1 + (1 + @x))
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + @x)) :|: @x >= 0, z = 1 + (1 + @x)
firstline(z) -{ 1 }→ firstline#1(@l) :|: z = @l, @l >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(@l1, @l2)) :|: @l1 >= 0, z' = @l2, @l2 >= 0, z = @l1
lcs#1(z) -{ 1 }→ lcs#2(@m) :|: @m >= 0, z = @m
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(@l1, @l2) :|: @l1 >= 0, z' = @l2, @l2 >= 0, z = @l1
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, @l2), @l2, @x) :|: z' = @l2, @x >= 0, z = 1 + @x + @xs, @l2 >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
lcstable#1(z, z') -{ 1 }→ 1 + firstline(@l2) + 1 :|: z' = @l2, z = 1, @l2 >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(@m, @l2, @x) :|: @m >= 0, z' = @l2, @x >= 0, @l2 >= 0, z = @m, z'' = @x
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z' = @l2, @x >= 0, z = 1, @l2 >= 0, z'' = @x
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(@x, @l, @l2) + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z' = @l2, @x >= 0, @l2 >= 0, z'' = @x
max(z, z') -{ 2 }→ max#1(#ckgt(#compare(@a, @b)), @a, @b) :|: @a >= 0, z = @a, z' = @b, @b >= 0
max#1(z, z', z'') -{ 1 }→ @a :|: z = 2, @a >= 0, z' = @a, @b >= 0, z'' = @b
max#1(z, z', z'') -{ 1 }→ @b :|: @a >= 0, z = 1, z' = @a, @b >= 0, z'' = @b
max#1(z, z', z'') -{ 0 }→ 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0
newline(z, z', z'') -{ 1 }→ newline#1(@l, @lastline, @y) :|: @l >= 0, z'' = @l, @lastline >= 0, z' = @lastline, z = @y, @y >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(@lastline, @x, @xs, @y) :|: @x >= 0, z = 1 + @x + @xs, @lastline >= 0, z' = @lastline, @xs >= 0, @y >= 0, z'' = @y
newline#1(z, z', z'') -{ 1 }→ 1 :|: @lastline >= 0, z = 1, z' = @lastline, @y >= 0, z'' = @y
newline#1(z, z', z'') -{ 0 }→ 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(@xs, @lastline', @y), @belowVal, @lastline', @x, @y) :|: @lastline' >= 0, @x >= 0, z1 = @y, z = 1 + @belowVal + @lastline', @xs >= 0, @y >= 0, z' = @x, z'' = @xs, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: @x >= 0, z = 1, z1 = @y, @xs >= 0, @y >= 0, z' = @x, z'' = @xs
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z1 = v3, v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0, v3 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', @belowVal, @lastline', @nl, @x, @y) :|: z'' = @lastline', z1 = @x, @lastline' >= 0, @x >= 0, z = @nl, z2 = @y, z' = @belowVal, @y >= 0, @nl >= 0, @belowVal >= 0, @x' >= 0, @nl = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, @belowVal, @lastline', @nl, @x, @y) :|: z'' = @lastline', z1 = @x, @lastline' >= 0, @x >= 0, z = @nl, z2 = @y, z' = @belowVal, @y >= 0, @nl >= 0, @belowVal >= 0, v0 >= 0, @nl = v0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), @belowVal, @lastline', @nl, @x, @y) :|: z'' = @lastline', z1 = @x, @lastline' >= 0, @x >= 0, z = @nl, z2 = @y, z' = @belowVal, @y >= 0, @nl >= 0, @belowVal >= 0, @nl = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', @belowVal, @nl, @rightVal, @x, @y) :|: z'' = @lastline', @lastline' >= 0, @x >= 0, @rightVal >= 0, z1 = @nl, z2 = @x, z = @rightVal, z' = @belowVal, z3 = @y, @y >= 0, @belowVal >= 0, @nl >= 0, @x' >= 0, @lastline' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, @belowVal, @nl, @rightVal, @x, @y) :|: z'' = @lastline', @lastline' >= 0, @x >= 0, @rightVal >= 0, z1 = @nl, z2 = @x, z = @rightVal, z' = @belowVal, z3 = @y, @y >= 0, @belowVal >= 0, @nl >= 0, v0 >= 0, @lastline' = v0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), @belowVal, @nl, @rightVal, @x, @y) :|: z'' = @lastline', @lastline' >= 0, @x >= 0, @rightVal >= 0, z1 = @nl, z2 = @x, z = @rightVal, z' = @belowVal, z3 = @y, @y >= 0, @belowVal >= 0, @nl >= 0, @lastline' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(@x, @y), @belowVal, @diagVal, @rightVal), @nl) :|: z = @diagVal, @x >= 0, @rightVal >= 0, z2 = @x, z' = @belowVal, z3 = @y, z'' = @nl, z1 = @rightVal, @diagVal >= 0, @y >= 0, @belowVal >= 0, @nl >= 0
newline#6(z, z') -{ 1 }→ 1 + @elem + @nl :|: @elem >= 0, z' = @nl, @nl >= 0, z = @elem
newline#7(z, z', z'', z1) -{ 1 }→ plus(@diagVal, 1 + (1 + 0)) :|: z = 2, @rightVal >= 0, z' = @belowVal, z1 = @rightVal, @diagVal >= 0, z'' = @diagVal, @belowVal >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(@belowVal, @rightVal) :|: @rightVal >= 0, z = 1, z' = @belowVal, z1 = @rightVal, @diagVal >= 0, z'' = @diagVal, @belowVal >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z1 = v3, v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0, v3 >= 0
plus(z, z') -{ 1 }→ #add(@x, @y) :|: z = @x, @x >= 0, z' = @y, @y >= 0
right(z) -{ 2 }→ @x :|: z = @l, @l >= 0, @x >= 0, @l = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z = @l, @l >= 0, v0 >= 0, @l = v0
right(z) -{ 2 }→ #abs(0) :|: z = @l, @l >= 0, @l = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

(15) SimplificationProof (BOTH BOUNDS(ID, ID) transformation)

Simplified the RNTS by moving equalities from the constraints into the right-hand sides.

(16) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#compare(z, z') -{ 0 }→ #compare(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ #compare(z' - 1, z - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z - 1, z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z' - 1, z - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 1 }→ firstline#1(z) :|: z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 1 }→ 1 + firstline(z') + 1 :|: z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 2 }→ max#1(#ckgt(#compare(z, z')), z, z') :|: z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

(17) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID) transformation)

Found the following analysis order by SCC decomposition:

{ #and }
{ right#1 }
{ max#1 }
{ #compare }
{ #ckgt }
{ newline#6 }
{ firstline#1, firstline }
{ #pred }
{ lcs#3 }
{ #abs }
{ #succ }
{ #eq }
{ max }
{ #greater }
{ #add }
{ right }
{ lcs#2 }
{ #equal }
{ plus }
{ lcs#1 }
{ newline#7 }
{ newline#5 }
{ newline#4 }
{ newline#3 }
{ newline#1, newline#2 }
{ newline }
{ lcstable#3 }
{ lcstable#2 }
{ lcstable#1 }
{ lcstable }
{ lcs }

(18) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#compare(z, z') -{ 0 }→ #compare(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ #compare(z' - 1, z - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z - 1, z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z' - 1, z - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 1 }→ firstline#1(z) :|: z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 1 }→ 1 + firstline(z') + 1 :|: z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 2 }→ max#1(#ckgt(#compare(z, z')), z, z') :|: z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#and}, {right#1}, {max#1}, {#compare}, {#ckgt}, {newline#6}, {firstline#1,firstline}, {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}

(19) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #and
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(20) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#compare(z, z') -{ 0 }→ #compare(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ #compare(z' - 1, z - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z - 1, z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z' - 1, z - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 1 }→ firstline#1(z) :|: z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 1 }→ 1 + firstline(z') + 1 :|: z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 2 }→ max#1(#ckgt(#compare(z, z')), z, z') :|: z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#and}, {right#1}, {max#1}, {#compare}, {#ckgt}, {newline#6}, {firstline#1,firstline}, {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: ?, size: O(1) [2]

(21) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #and
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(22) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#compare(z, z') -{ 0 }→ #compare(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ #compare(z' - 1, z - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z - 1, z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z' - 1, z - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 1 }→ firstline#1(z) :|: z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 1 }→ 1 + firstline(z') + 1 :|: z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 2 }→ max#1(#ckgt(#compare(z, z')), z, z') :|: z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {right#1}, {max#1}, {#compare}, {#ckgt}, {newline#6}, {firstline#1,firstline}, {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]

(23) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(24) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#compare(z, z') -{ 0 }→ #compare(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ #compare(z' - 1, z - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z - 1, z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z' - 1, z - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 1 }→ firstline#1(z) :|: z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 1 }→ 1 + firstline(z') + 1 :|: z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 2 }→ max#1(#ckgt(#compare(z, z')), z, z') :|: z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {right#1}, {max#1}, {#compare}, {#ckgt}, {newline#6}, {firstline#1,firstline}, {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]

(25) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: right#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z

(26) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#compare(z, z') -{ 0 }→ #compare(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ #compare(z' - 1, z - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z - 1, z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z' - 1, z - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 1 }→ firstline#1(z) :|: z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 1 }→ 1 + firstline(z') + 1 :|: z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 2 }→ max#1(#ckgt(#compare(z, z')), z, z') :|: z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {right#1}, {max#1}, {#compare}, {#ckgt}, {newline#6}, {firstline#1,firstline}, {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: ?, size: O(n1) [z]

(27) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: right#1
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(28) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#compare(z, z') -{ 0 }→ #compare(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ #compare(z' - 1, z - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z - 1, z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z' - 1, z - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 1 }→ firstline#1(z) :|: z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 1 }→ 1 + firstline(z') + 1 :|: z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 2 }→ max#1(#ckgt(#compare(z, z')), z, z') :|: z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {max#1}, {#compare}, {#ckgt}, {newline#6}, {firstline#1,firstline}, {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]

(29) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(30) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#compare(z, z') -{ 0 }→ #compare(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ #compare(z' - 1, z - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z - 1, z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z' - 1, z - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 1 }→ firstline#1(z) :|: z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 1 }→ 1 + firstline(z') + 1 :|: z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 2 }→ max#1(#ckgt(#compare(z, z')), z, z') :|: z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {max#1}, {#compare}, {#ckgt}, {newline#6}, {firstline#1,firstline}, {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]

(31) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: max#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z' + z''

(32) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#compare(z, z') -{ 0 }→ #compare(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ #compare(z' - 1, z - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z - 1, z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z' - 1, z - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 1 }→ firstline#1(z) :|: z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 1 }→ 1 + firstline(z') + 1 :|: z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 2 }→ max#1(#ckgt(#compare(z, z')), z, z') :|: z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {max#1}, {#compare}, {#ckgt}, {newline#6}, {firstline#1,firstline}, {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: ?, size: O(n1) [z' + z'']

(33) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: max#1
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(34) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#compare(z, z') -{ 0 }→ #compare(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ #compare(z' - 1, z - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z - 1, z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z' - 1, z - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 1 }→ firstline#1(z) :|: z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 1 }→ 1 + firstline(z') + 1 :|: z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 2 }→ max#1(#ckgt(#compare(z, z')), z, z') :|: z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#compare}, {#ckgt}, {newline#6}, {firstline#1,firstline}, {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']

(35) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(36) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#compare(z, z') -{ 0 }→ #compare(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ #compare(z' - 1, z - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z - 1, z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z' - 1, z - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 1 }→ firstline#1(z) :|: z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 1 }→ 1 + firstline(z') + 1 :|: z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 2 }→ max#1(#ckgt(#compare(z, z')), z, z') :|: z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#compare}, {#ckgt}, {newline#6}, {firstline#1,firstline}, {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']

(37) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #compare
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 3

(38) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#compare(z, z') -{ 0 }→ #compare(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ #compare(z' - 1, z - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z - 1, z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z' - 1, z - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 1 }→ firstline#1(z) :|: z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 1 }→ 1 + firstline(z') + 1 :|: z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 2 }→ max#1(#ckgt(#compare(z, z')), z, z') :|: z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#compare}, {#ckgt}, {newline#6}, {firstline#1,firstline}, {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: ?, size: O(1) [3]

(39) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #compare
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(40) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#compare(z, z') -{ 0 }→ #compare(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ #compare(z' - 1, z - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z - 1, z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z' - 1, z - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 1 }→ firstline#1(z) :|: z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 1 }→ 1 + firstline(z') + 1 :|: z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 2 }→ max#1(#ckgt(#compare(z, z')), z, z') :|: z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#ckgt}, {newline#6}, {firstline#1,firstline}, {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]

(41) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(42) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(s'') :|: s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(s1) :|: s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 1 }→ firstline#1(z) :|: z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 1 }→ 1 + firstline(z') + 1 :|: z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 2 }→ max#1(#ckgt(s2), z, z') :|: s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#ckgt}, {newline#6}, {firstline#1,firstline}, {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]

(43) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #ckgt
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(44) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(s'') :|: s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(s1) :|: s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 1 }→ firstline#1(z) :|: z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 1 }→ 1 + firstline(z') + 1 :|: z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 2 }→ max#1(#ckgt(s2), z, z') :|: s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#ckgt}, {newline#6}, {firstline#1,firstline}, {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: ?, size: O(1) [2]

(45) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #ckgt
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(46) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(s'') :|: s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(s1) :|: s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 1 }→ firstline#1(z) :|: z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 1 }→ 1 + firstline(z') + 1 :|: z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 2 }→ max#1(#ckgt(s2), z, z') :|: s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {newline#6}, {firstline#1,firstline}, {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]

(47) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(48) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 1 }→ firstline#1(z) :|: z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 1 }→ 1 + firstline(z') + 1 :|: z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {newline#6}, {firstline#1,firstline}, {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]

(49) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: newline#6
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + z + z'

(50) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 1 }→ firstline#1(z) :|: z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 1 }→ 1 + firstline(z') + 1 :|: z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {newline#6}, {firstline#1,firstline}, {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: ?, size: O(n1) [1 + z + z']

(51) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: newline#6
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(52) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 1 }→ firstline#1(z) :|: z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 1 }→ 1 + firstline(z') + 1 :|: z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {firstline#1,firstline}, {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']

(53) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(54) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 1 }→ firstline#1(z) :|: z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 1 }→ 1 + firstline(z') + 1 :|: z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {firstline#1,firstline}, {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']

(55) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: firstline#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z

Computed SIZE bound using CoFloCo for: firstline
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z

(56) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 1 }→ firstline#1(z) :|: z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 1 }→ 1 + firstline(z') + 1 :|: z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {firstline#1,firstline}, {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: ?, size: O(n1) [z]
firstline: runtime: ?, size: O(n1) [z]

(57) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using PUBS for: firstline#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + 3·z

Computed RUNTIME bound using CoFloCo for: firstline
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2 + 3·z

(58) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 1 }→ firstline#1(z) :|: z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 2 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
firstline#1(z) -{ 1 }→ 1 + 0 + firstline(@xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 1 }→ 1 + firstline(z') + 1 :|: z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]

(59) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(60) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]

(61) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #pred
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2 + z

(62) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#pred}, {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: ?, size: O(n1) [2 + z]

(63) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #pred
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(64) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]

(65) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(66) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]

(67) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: lcs#3
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z

(68) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcs#3}, {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: ?, size: O(n1) [z]

(69) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: lcs#3
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(70) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]

(71) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(72) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]

(73) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #abs
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + z

(74) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#abs}, {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: ?, size: O(n1) [1 + z]

(75) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #abs
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(76) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#2(z) -{ 2 }→ #abs(0) :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(#abs(0), z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(#abs(0), z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 1 }→ 0 :|: z >= 0
right(z) -{ 2 }→ #abs(0) :|: z >= 0, z = 1
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]

(77) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(78) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]

(79) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #succ
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2 + z

(80) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#succ}, {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: ?, size: O(n1) [2 + z]

(81) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #succ
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(82) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]

(83) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(84) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]

(85) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #eq
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(86) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#eq}, {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: ?, size: O(1) [2]

(87) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #eq
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(88) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(#eq(z2, z3), z', z, z1), z'') :|: z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]

(89) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(90) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]

(91) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: max
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z + z'

(92) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {max}, {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: ?, size: O(n1) [z + z']

(93) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: max
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 3

(94) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ max(z', z1) :|: z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']

(95) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(96) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']

(97) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #greater
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(98) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#greater}, {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: ?, size: O(1) [2]

(99) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #greater
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(100) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]

(101) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(102) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]

(103) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: #add
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2·z + z'

(104) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#add}, {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: ?, size: O(n1) [2·z + z']

(105) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #add
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(106) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ #add(z, z') :|: z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']

(107) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(108) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']

(109) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: right
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z

(110) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {right}, {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: ?, size: O(n1) [z]

(111) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: right
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 3

(112) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]

(113) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(114) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]

(115) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: lcs#2
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z

(116) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcs#2}, {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: ?, size: O(n1) [z]

(117) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: lcs#2
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 3

(118) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 1 }→ lcs#2(z) :|: z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]

(119) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(120) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]

(121) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #equal
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(122) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {#equal}, {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: ?, size: O(1) [2]

(123) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #equal
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(124) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]

(125) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(126) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]

(127) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: plus
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2·z + z'

(128) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {plus}, {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: ?, size: O(n1) [2·z + z']

(129) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: plus
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(130) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 1 }→ plus(z'', 1 + (1 + 0)) :|: z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']

(131) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(132) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']

(133) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: lcs#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z

(134) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcs#1}, {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: ?, size: O(n1) [z]

(135) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: lcs#1
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 4

(136) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]

(137) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(138) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]

(139) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: newline#7
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2 + z' + 2·z'' + z1

(140) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {newline#7}, {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: ?, size: O(n1) [2 + z' + 2·z'' + z1]

(141) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: newline#7
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 4

(142) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 2 }→ newline#6(newline#7(s22, z', z, z1), z'') :|: s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]

(143) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(144) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]

(145) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: newline#5
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 3 + 2·z + z' + z'' + z1

(146) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {newline#5}, {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: ?, size: O(n1) [3 + 2·z + z' + z'' + z1]

(147) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: newline#5
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 7

(148) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 3 }→ newline#5(@x', z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 4 }→ newline#5(s18, z', z1, z, z2, z3) :|: s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 2 }→ newline#5(0, z', z1, z, z2, z3) :|: z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]

(149) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(150) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]

(151) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: newline#4
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 3 + z + z' + 2·z'' + z1

(152) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {newline#4}, {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: ?, size: O(n1) [3 + z + z' + 2·z'' + z1]

(153) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: newline#4
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 11

(154) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 3 }→ newline#4(@x', z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 4 }→ newline#4(s17, z', z'', z, z1, z2) :|: s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 2 }→ newline#4(0, z', z'', z, z1, z2) :|: z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]

(155) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(156) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]

(157) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: newline#3
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 3 + 2·z + z' + 2·z''

(158) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {newline#3}, {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: ?, size: O(n1) [3 + 2·z + z' + 2·z'']

(159) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: newline#3
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 15

(160) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: O(1) [15], size: O(n1) [3 + 2·z + z' + 2·z'']

(161) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(162) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: O(1) [15], size: O(n1) [3 + 2·z + z' + 2·z'']

(163) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: newline#1
after applying outer abstraction to obtain an ITS,
resulting in: EXP with polynomial bound: ?

Computed SIZE bound using CoFloCo for: newline#2
after applying outer abstraction to obtain an ITS,
resulting in: INF with polynomial bound: ?

(164) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {newline#1,newline#2}, {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: O(1) [15], size: O(n1) [3 + 2·z + z' + 2·z'']
newline#1: runtime: ?, size: EXP
newline#2: runtime: ?, size: INF

(165) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: newline#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 20 + 18·z

Computed RUNTIME bound using CoFloCo for: newline#2
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 37 + 18·z''

(166) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 1 }→ newline#1(z'', z', z) :|: z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 1 }→ newline#2(z', @x, @xs, z'') :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 2 }→ newline#3(newline#1(z'', @lastline', z1), @belowVal, @lastline', z', z1) :|: @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: O(1) [15], size: O(n1) [3 + 2·z + z' + 2·z'']
newline#1: runtime: O(n1) [20 + 18·z], size: EXP
newline#2: runtime: O(n1) [37 + 18·z''], size: INF

(167) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(168) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 21 + 18·z'' }→ s44 :|: s44 >= 0, s44 <= inf, z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 38 + 18·@xs }→ s45 :|: s45 >= 0, s45 <= inf', @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 37 + 18·z'' }→ s47 :|: s46 >= 0, s46 <= inf'', s47 >= 0, s47 <= 2 * s46 + 1 * @belowVal + 2 * @lastline' + 3, @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: O(1) [15], size: O(n1) [3 + 2·z + z' + 2·z'']
newline#1: runtime: O(n1) [20 + 18·z], size: EXP
newline#2: runtime: O(n1) [37 + 18·z''], size: INF

(169) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: newline
after applying outer abstraction to obtain an ITS,
resulting in: INF with polynomial bound: ?

(170) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 21 + 18·z'' }→ s44 :|: s44 >= 0, s44 <= inf, z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 38 + 18·@xs }→ s45 :|: s45 >= 0, s45 <= inf', @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 37 + 18·z'' }→ s47 :|: s46 >= 0, s46 <= inf'', s47 >= 0, s47 <= 2 * s46 + 1 * @belowVal + 2 * @lastline' + 3, @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {newline}, {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: O(1) [15], size: O(n1) [3 + 2·z + z' + 2·z'']
newline#1: runtime: O(n1) [20 + 18·z], size: EXP
newline#2: runtime: O(n1) [37 + 18·z''], size: INF
newline: runtime: ?, size: INF

(171) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: newline
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 21 + 18·z''

(172) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 + newline(z'', @l, z') + (1 + @l + @ls) :|: z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 21 + 18·z'' }→ s44 :|: s44 >= 0, s44 <= inf, z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 38 + 18·@xs }→ s45 :|: s45 >= 0, s45 <= inf', @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 37 + 18·z'' }→ s47 :|: s46 >= 0, s46 <= inf'', s47 >= 0, s47 <= 2 * s46 + 1 * @belowVal + 2 * @lastline' + 3, @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: O(1) [15], size: O(n1) [3 + 2·z + z' + 2·z'']
newline#1: runtime: O(n1) [20 + 18·z], size: EXP
newline#2: runtime: O(n1) [37 + 18·z''], size: INF
newline: runtime: O(n1) [21 + 18·z''], size: INF

(173) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(174) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 22 + 18·z' }→ 1 + s48 + (1 + @l + @ls) :|: s48 >= 0, s48 <= inf1, z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 21 + 18·z'' }→ s44 :|: s44 >= 0, s44 <= inf, z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 38 + 18·@xs }→ s45 :|: s45 >= 0, s45 <= inf', @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 37 + 18·z'' }→ s47 :|: s46 >= 0, s46 <= inf'', s47 >= 0, s47 <= 2 * s46 + 1 * @belowVal + 2 * @lastline' + 3, @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: O(1) [15], size: O(n1) [3 + 2·z + z' + 2·z'']
newline#1: runtime: O(n1) [20 + 18·z], size: EXP
newline#2: runtime: O(n1) [37 + 18·z''], size: INF
newline: runtime: O(n1) [21 + 18·z''], size: INF

(175) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: lcstable#3
after applying outer abstraction to obtain an ITS,
resulting in: INF with polynomial bound: ?

(176) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 22 + 18·z' }→ 1 + s48 + (1 + @l + @ls) :|: s48 >= 0, s48 <= inf1, z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 21 + 18·z'' }→ s44 :|: s44 >= 0, s44 <= inf, z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 38 + 18·@xs }→ s45 :|: s45 >= 0, s45 <= inf', @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 37 + 18·z'' }→ s47 :|: s46 >= 0, s46 <= inf'', s47 >= 0, s47 <= 2 * s46 + 1 * @belowVal + 2 * @lastline' + 3, @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcstable#3}, {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: O(1) [15], size: O(n1) [3 + 2·z + z' + 2·z'']
newline#1: runtime: O(n1) [20 + 18·z], size: EXP
newline#2: runtime: O(n1) [37 + 18·z''], size: INF
newline: runtime: O(n1) [21 + 18·z''], size: INF
lcstable#3: runtime: ?, size: INF

(177) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: lcstable#3
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 22 + 18·z'

(178) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 1 }→ lcstable#3(z, z', z'') :|: z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 22 + 18·z' }→ 1 + s48 + (1 + @l + @ls) :|: s48 >= 0, s48 <= inf1, z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 21 + 18·z'' }→ s44 :|: s44 >= 0, s44 <= inf, z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 38 + 18·@xs }→ s45 :|: s45 >= 0, s45 <= inf', @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 37 + 18·z'' }→ s47 :|: s46 >= 0, s46 <= inf'', s47 >= 0, s47 <= 2 * s46 + 1 * @belowVal + 2 * @lastline' + 3, @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: O(1) [15], size: O(n1) [3 + 2·z + z' + 2·z'']
newline#1: runtime: O(n1) [20 + 18·z], size: EXP
newline#2: runtime: O(n1) [37 + 18·z''], size: INF
newline: runtime: O(n1) [21 + 18·z''], size: INF
lcstable#3: runtime: O(n1) [22 + 18·z'], size: INF

(179) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(180) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 23 + 18·z' }→ s49 :|: s49 >= 0, s49 <= inf2, z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 22 + 18·z' }→ 1 + s48 + (1 + @l + @ls) :|: s48 >= 0, s48 <= inf1, z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 21 + 18·z'' }→ s44 :|: s44 >= 0, s44 <= inf, z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 38 + 18·@xs }→ s45 :|: s45 >= 0, s45 <= inf', @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 37 + 18·z'' }→ s47 :|: s46 >= 0, s46 <= inf'', s47 >= 0, s47 <= 2 * s46 + 1 * @belowVal + 2 * @lastline' + 3, @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: O(1) [15], size: O(n1) [3 + 2·z + z' + 2·z'']
newline#1: runtime: O(n1) [20 + 18·z], size: EXP
newline#2: runtime: O(n1) [37 + 18·z''], size: INF
newline: runtime: O(n1) [21 + 18·z''], size: INF
lcstable#3: runtime: O(n1) [22 + 18·z'], size: INF

(181) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: lcstable#2
after applying outer abstraction to obtain an ITS,
resulting in: INF with polynomial bound: ?

(182) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 23 + 18·z' }→ s49 :|: s49 >= 0, s49 <= inf2, z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 22 + 18·z' }→ 1 + s48 + (1 + @l + @ls) :|: s48 >= 0, s48 <= inf1, z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 21 + 18·z'' }→ s44 :|: s44 >= 0, s44 <= inf, z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 38 + 18·@xs }→ s45 :|: s45 >= 0, s45 <= inf', @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 37 + 18·z'' }→ s47 :|: s46 >= 0, s46 <= inf'', s47 >= 0, s47 <= 2 * s46 + 1 * @belowVal + 2 * @lastline' + 3, @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcstable#2}, {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: O(1) [15], size: O(n1) [3 + 2·z + z' + 2·z'']
newline#1: runtime: O(n1) [20 + 18·z], size: EXP
newline#2: runtime: O(n1) [37 + 18·z''], size: INF
newline: runtime: O(n1) [21 + 18·z''], size: INF
lcstable#3: runtime: O(n1) [22 + 18·z'], size: INF
lcstable#2: runtime: ?, size: INF

(183) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: lcstable#2
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 23 + 18·z'

(184) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 23 + 18·z' }→ s49 :|: s49 >= 0, s49 <= inf2, z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 22 + 18·z' }→ 1 + s48 + (1 + @l + @ls) :|: s48 >= 0, s48 <= inf1, z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 21 + 18·z'' }→ s44 :|: s44 >= 0, s44 <= inf, z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 38 + 18·@xs }→ s45 :|: s45 >= 0, s45 <= inf', @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 37 + 18·z'' }→ s47 :|: s46 >= 0, s46 <= inf'', s47 >= 0, s47 <= 2 * s46 + 1 * @belowVal + 2 * @lastline' + 3, @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: O(1) [15], size: O(n1) [3 + 2·z + z' + 2·z'']
newline#1: runtime: O(n1) [20 + 18·z], size: EXP
newline#2: runtime: O(n1) [37 + 18·z''], size: INF
newline: runtime: O(n1) [21 + 18·z''], size: INF
lcstable#3: runtime: O(n1) [22 + 18·z'], size: INF
lcstable#2: runtime: O(n1) [23 + 18·z'], size: INF

(185) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(186) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 23 + 18·z' }→ s49 :|: s49 >= 0, s49 <= inf2, z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 22 + 18·z' }→ 1 + s48 + (1 + @l + @ls) :|: s48 >= 0, s48 <= inf1, z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 21 + 18·z'' }→ s44 :|: s44 >= 0, s44 <= inf, z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 38 + 18·@xs }→ s45 :|: s45 >= 0, s45 <= inf', @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 37 + 18·z'' }→ s47 :|: s46 >= 0, s46 <= inf'', s47 >= 0, s47 <= 2 * s46 + 1 * @belowVal + 2 * @lastline' + 3, @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: O(1) [15], size: O(n1) [3 + 2·z + z' + 2·z'']
newline#1: runtime: O(n1) [20 + 18·z], size: EXP
newline#2: runtime: O(n1) [37 + 18·z''], size: INF
newline: runtime: O(n1) [21 + 18·z''], size: INF
lcstable#3: runtime: O(n1) [22 + 18·z'], size: INF
lcstable#2: runtime: O(n1) [23 + 18·z'], size: INF

(187) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: lcstable#1
after applying outer abstraction to obtain an ITS,
resulting in: INF with polynomial bound: ?

(188) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 23 + 18·z' }→ s49 :|: s49 >= 0, s49 <= inf2, z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 22 + 18·z' }→ 1 + s48 + (1 + @l + @ls) :|: s48 >= 0, s48 <= inf1, z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 21 + 18·z'' }→ s44 :|: s44 >= 0, s44 <= inf, z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 38 + 18·@xs }→ s45 :|: s45 >= 0, s45 <= inf', @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 37 + 18·z'' }→ s47 :|: s46 >= 0, s46 <= inf'', s47 >= 0, s47 <= 2 * s46 + 1 * @belowVal + 2 * @lastline' + 3, @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcstable#1}, {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: O(1) [15], size: O(n1) [3 + 2·z + z' + 2·z'']
newline#1: runtime: O(n1) [20 + 18·z], size: EXP
newline#2: runtime: O(n1) [37 + 18·z''], size: INF
newline: runtime: O(n1) [21 + 18·z''], size: INF
lcstable#3: runtime: O(n1) [22 + 18·z'], size: INF
lcstable#2: runtime: O(n1) [23 + 18·z'], size: INF
lcstable#1: runtime: ?, size: INF

(189) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: lcstable#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 3 + 25·z + 18·z·z' + 3·z'

(190) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 2 }→ lcs#1(lcstable#1(z, z')) :|: z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 1 }→ lcstable#1(z, z') :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 2 }→ lcstable#2(lcstable#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 23 + 18·z' }→ s49 :|: s49 >= 0, s49 <= inf2, z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 22 + 18·z' }→ 1 + s48 + (1 + @l + @ls) :|: s48 >= 0, s48 <= inf1, z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 21 + 18·z'' }→ s44 :|: s44 >= 0, s44 <= inf, z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 38 + 18·@xs }→ s45 :|: s45 >= 0, s45 <= inf', @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 37 + 18·z'' }→ s47 :|: s46 >= 0, s46 <= inf'', s47 >= 0, s47 <= 2 * s46 + 1 * @belowVal + 2 * @lastline' + 3, @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: O(1) [15], size: O(n1) [3 + 2·z + z' + 2·z'']
newline#1: runtime: O(n1) [20 + 18·z], size: EXP
newline#2: runtime: O(n1) [37 + 18·z''], size: INF
newline: runtime: O(n1) [21 + 18·z''], size: INF
lcstable#3: runtime: O(n1) [22 + 18·z'], size: INF
lcstable#2: runtime: O(n1) [23 + 18·z'], size: INF
lcstable#1: runtime: O(n2) [3 + 25·z + 18·z·z' + 3·z'], size: INF

(191) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(192) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 9 + 25·z + 18·z·z' + 3·z' }→ s51 :|: s50 >= 0, s50 <= inf3, s51 >= 0, s51 <= 1 * s50, z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 4 + 25·z + 18·z·z' + 3·z' }→ s52 :|: s52 >= 0, s52 <= inf4, z >= 0, z' >= 0
lcstable#1(z, z') -{ 28 + 25·@xs + 18·@xs·z' + 21·z' }→ s54 :|: s53 >= 0, s53 <= inf5, s54 >= 0, s54 <= inf6, @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 23 + 18·z' }→ s49 :|: s49 >= 0, s49 <= inf2, z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 22 + 18·z' }→ 1 + s48 + (1 + @l + @ls) :|: s48 >= 0, s48 <= inf1, z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 21 + 18·z'' }→ s44 :|: s44 >= 0, s44 <= inf, z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 38 + 18·@xs }→ s45 :|: s45 >= 0, s45 <= inf', @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 37 + 18·z'' }→ s47 :|: s46 >= 0, s46 <= inf'', s47 >= 0, s47 <= 2 * s46 + 1 * @belowVal + 2 * @lastline' + 3, @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: O(1) [15], size: O(n1) [3 + 2·z + z' + 2·z'']
newline#1: runtime: O(n1) [20 + 18·z], size: EXP
newline#2: runtime: O(n1) [37 + 18·z''], size: INF
newline: runtime: O(n1) [21 + 18·z''], size: INF
lcstable#3: runtime: O(n1) [22 + 18·z'], size: INF
lcstable#2: runtime: O(n1) [23 + 18·z'], size: INF
lcstable#1: runtime: O(n2) [3 + 25·z + 18·z·z' + 3·z'], size: INF

(193) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: lcstable
after applying outer abstraction to obtain an ITS,
resulting in: INF with polynomial bound: ?

(194) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 9 + 25·z + 18·z·z' + 3·z' }→ s51 :|: s50 >= 0, s50 <= inf3, s51 >= 0, s51 <= 1 * s50, z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 4 + 25·z + 18·z·z' + 3·z' }→ s52 :|: s52 >= 0, s52 <= inf4, z >= 0, z' >= 0
lcstable#1(z, z') -{ 28 + 25·@xs + 18·@xs·z' + 21·z' }→ s54 :|: s53 >= 0, s53 <= inf5, s54 >= 0, s54 <= inf6, @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 23 + 18·z' }→ s49 :|: s49 >= 0, s49 <= inf2, z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 22 + 18·z' }→ 1 + s48 + (1 + @l + @ls) :|: s48 >= 0, s48 <= inf1, z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 21 + 18·z'' }→ s44 :|: s44 >= 0, s44 <= inf, z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 38 + 18·@xs }→ s45 :|: s45 >= 0, s45 <= inf', @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 37 + 18·z'' }→ s47 :|: s46 >= 0, s46 <= inf'', s47 >= 0, s47 <= 2 * s46 + 1 * @belowVal + 2 * @lastline' + 3, @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcstable}, {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: O(1) [15], size: O(n1) [3 + 2·z + z' + 2·z'']
newline#1: runtime: O(n1) [20 + 18·z], size: EXP
newline#2: runtime: O(n1) [37 + 18·z''], size: INF
newline: runtime: O(n1) [21 + 18·z''], size: INF
lcstable#3: runtime: O(n1) [22 + 18·z'], size: INF
lcstable#2: runtime: O(n1) [23 + 18·z'], size: INF
lcstable#1: runtime: O(n2) [3 + 25·z + 18·z·z' + 3·z'], size: INF
lcstable: runtime: ?, size: INF

(195) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: lcstable
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 4 + 25·z + 18·z·z' + 3·z'

(196) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 9 + 25·z + 18·z·z' + 3·z' }→ s51 :|: s50 >= 0, s50 <= inf3, s51 >= 0, s51 <= 1 * s50, z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 4 + 25·z + 18·z·z' + 3·z' }→ s52 :|: s52 >= 0, s52 <= inf4, z >= 0, z' >= 0
lcstable#1(z, z') -{ 28 + 25·@xs + 18·@xs·z' + 21·z' }→ s54 :|: s53 >= 0, s53 <= inf5, s54 >= 0, s54 <= inf6, @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 23 + 18·z' }→ s49 :|: s49 >= 0, s49 <= inf2, z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 22 + 18·z' }→ 1 + s48 + (1 + @l + @ls) :|: s48 >= 0, s48 <= inf1, z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 21 + 18·z'' }→ s44 :|: s44 >= 0, s44 <= inf, z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 38 + 18·@xs }→ s45 :|: s45 >= 0, s45 <= inf', @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 37 + 18·z'' }→ s47 :|: s46 >= 0, s46 <= inf'', s47 >= 0, s47 <= 2 * s46 + 1 * @belowVal + 2 * @lastline' + 3, @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: O(1) [15], size: O(n1) [3 + 2·z + z' + 2·z'']
newline#1: runtime: O(n1) [20 + 18·z], size: EXP
newline#2: runtime: O(n1) [37 + 18·z''], size: INF
newline: runtime: O(n1) [21 + 18·z''], size: INF
lcstable#3: runtime: O(n1) [22 + 18·z'], size: INF
lcstable#2: runtime: O(n1) [23 + 18·z'], size: INF
lcstable#1: runtime: O(n2) [3 + 25·z + 18·z·z' + 3·z'], size: INF
lcstable: runtime: O(n2) [4 + 25·z + 18·z·z' + 3·z'], size: INF

(197) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(198) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 9 + 25·z + 18·z·z' + 3·z' }→ s51 :|: s50 >= 0, s50 <= inf3, s51 >= 0, s51 <= 1 * s50, z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 4 + 25·z + 18·z·z' + 3·z' }→ s52 :|: s52 >= 0, s52 <= inf4, z >= 0, z' >= 0
lcstable#1(z, z') -{ 28 + 25·@xs + 18·@xs·z' + 21·z' }→ s54 :|: s53 >= 0, s53 <= inf5, s54 >= 0, s54 <= inf6, @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 23 + 18·z' }→ s49 :|: s49 >= 0, s49 <= inf2, z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 22 + 18·z' }→ 1 + s48 + (1 + @l + @ls) :|: s48 >= 0, s48 <= inf1, z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 21 + 18·z'' }→ s44 :|: s44 >= 0, s44 <= inf, z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 38 + 18·@xs }→ s45 :|: s45 >= 0, s45 <= inf', @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 37 + 18·z'' }→ s47 :|: s46 >= 0, s46 <= inf'', s47 >= 0, s47 <= 2 * s46 + 1 * @belowVal + 2 * @lastline' + 3, @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: O(1) [15], size: O(n1) [3 + 2·z + z' + 2·z'']
newline#1: runtime: O(n1) [20 + 18·z], size: EXP
newline#2: runtime: O(n1) [37 + 18·z''], size: INF
newline: runtime: O(n1) [21 + 18·z''], size: INF
lcstable#3: runtime: O(n1) [22 + 18·z'], size: INF
lcstable#2: runtime: O(n1) [23 + 18·z'], size: INF
lcstable#1: runtime: O(n2) [3 + 25·z + 18·z·z' + 3·z'], size: INF
lcstable: runtime: O(n2) [4 + 25·z + 18·z·z' + 3·z'], size: INF

(199) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: lcs
after applying outer abstraction to obtain an ITS,
resulting in: INF with polynomial bound: ?

(200) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 9 + 25·z + 18·z·z' + 3·z' }→ s51 :|: s50 >= 0, s50 <= inf3, s51 >= 0, s51 <= 1 * s50, z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 4 + 25·z + 18·z·z' + 3·z' }→ s52 :|: s52 >= 0, s52 <= inf4, z >= 0, z' >= 0
lcstable#1(z, z') -{ 28 + 25·@xs + 18·@xs·z' + 21·z' }→ s54 :|: s53 >= 0, s53 <= inf5, s54 >= 0, s54 <= inf6, @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 23 + 18·z' }→ s49 :|: s49 >= 0, s49 <= inf2, z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 22 + 18·z' }→ 1 + s48 + (1 + @l + @ls) :|: s48 >= 0, s48 <= inf1, z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 21 + 18·z'' }→ s44 :|: s44 >= 0, s44 <= inf, z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 38 + 18·@xs }→ s45 :|: s45 >= 0, s45 <= inf', @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 37 + 18·z'' }→ s47 :|: s46 >= 0, s46 <= inf'', s47 >= 0, s47 <= 2 * s46 + 1 * @belowVal + 2 * @lastline' + 3, @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed: {lcs}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: O(1) [15], size: O(n1) [3 + 2·z + z' + 2·z'']
newline#1: runtime: O(n1) [20 + 18·z], size: EXP
newline#2: runtime: O(n1) [37 + 18·z''], size: INF
newline: runtime: O(n1) [21 + 18·z''], size: INF
lcstable#3: runtime: O(n1) [22 + 18·z'], size: INF
lcstable#2: runtime: O(n1) [23 + 18·z'], size: INF
lcstable#1: runtime: O(n2) [3 + 25·z + 18·z·z' + 3·z'], size: INF
lcstable: runtime: O(n2) [4 + 25·z + 18·z·z' + 3·z'], size: INF
lcs: runtime: ?, size: INF

(201) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: lcs
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 9 + 25·z + 18·z·z' + 3·z'

(202) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 0 }→ 0 :|: z >= 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 0
#add(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s12 :|: s12 >= 0, s12 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s13 :|: s13 >= 0, s13 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ s30 :|: s28 >= 0, s28 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s29 >= 0, s29 <= 1 * s28 + 2, s30 >= 0, s30 <= 1 * s29 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s33 :|: s31 >= 0, s31 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s32 >= 0, s32 <= 1 * s31 + 2, s33 >= 0, s33 <= 1 * s32 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s21 :|: s21 >= 0, s21 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s25 :|: s23 >= 0, s23 <= 2, s24 >= 0, s24 <= 2, s25 >= 0, s25 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s20 :|: s20 >= 0, s20 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
firstline(z) -{ 2 + 3·z }→ s7 :|: s7 >= 0, s7 <= 1 * z, z >= 0
firstline#1(z) -{ 1 }→ 1 :|: z = 1
firstline#1(z) -{ 0 }→ 0 :|: z >= 0
firstline#1(z) -{ 3 + 3·@xs }→ 1 + 0 + s10 :|: s10 >= 0, s10 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, v0 >= 0, 0 = v0
firstline#1(z) -{ 4 + 3·@xs }→ 1 + 0 + s9 :|: s9 >= 0, s9 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0, 0 = 0
lcs(z, z') -{ 9 + 25·z + 18·z·z' + 3·z' }→ s51 :|: s50 >= 0, s50 <= inf3, s51 >= 0, s51 <= 1 * s50, z >= 0, z' >= 0
lcs#1(z) -{ 4 }→ s34 :|: s34 >= 0, s34 <= 1 * z, z >= 0
lcs#2(z) -{ 2 }→ @len :|: z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @_@1 >= 0, @l1 = 1 + @len + @_@1, @len >= 0
lcs#2(z) -{ 3 }→ s16 :|: s16 >= 0, s16 <= 1 * 0 + 1, z = 1 + @l1 + @_@2, @l1 >= 0, @_@2 >= 0, @l1 = 1
lcs#2(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#2(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcs#3(z) -{ 1 }→ @len :|: @_@1 >= 0, z = 1 + @len + @_@1, @len >= 0
lcs#3(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
lcs#3(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0
lcstable(z, z') -{ 4 + 25·z + 18·z·z' + 3·z' }→ s52 :|: s52 >= 0, s52 <= inf4, z >= 0, z' >= 0
lcstable#1(z, z') -{ 28 + 25·@xs + 18·@xs·z' + 21·z' }→ s54 :|: s53 >= 0, s53 <= inf5, s54 >= 0, s54 <= inf6, @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0
lcstable#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
lcstable#1(z, z') -{ 3 + 3·z' }→ 1 + s8 + 1 :|: s8 >= 0, s8 <= 1 * z', z = 1, z' >= 0
lcstable#2(z, z', z'') -{ 23 + 18·z' }→ s49 :|: s49 >= 0, s49 <= inf2, z >= 0, z'' >= 0, z' >= 0
lcstable#3(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
lcstable#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
lcstable#3(z, z', z'') -{ 22 + 18·z' }→ 1 + s48 + (1 + @l + @ls) :|: s48 >= 0, s48 <= inf1, z = 1 + @l + @ls, @ls >= 0, @l >= 0, z'' >= 0, z' >= 0
max(z, z') -{ 3 }→ s6 :|: s5 >= 0, s5 <= 2, s6 >= 0, s6 <= 1 * z' + 1 * z, s2 >= 0, s2 <= 3, z >= 0, z' >= 0
max#1(z, z', z'') -{ 1 }→ z' :|: z = 2, z' >= 0, z'' >= 0
max#1(z, z', z'') -{ 1 }→ z'' :|: z' >= 0, z = 1, z'' >= 0
max#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline(z, z', z'') -{ 21 + 18·z'' }→ s44 :|: s44 >= 0, s44 <= inf, z'' >= 0, z' >= 0, z >= 0
newline#1(z, z', z'') -{ 38 + 18·@xs }→ s45 :|: s45 >= 0, s45 <= inf', @x >= 0, z = 1 + @x + @xs, z' >= 0, @xs >= 0, z'' >= 0
newline#1(z, z', z'') -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0
newline#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
newline#2(z, z', z'', z1) -{ 37 + 18·z'' }→ s47 :|: s46 >= 0, s46 <= inf'', s47 >= 0, s47 <= 2 * s46 + 1 * @belowVal + 2 * @lastline' + 3, @lastline' >= 0, z' >= 0, z = 1 + @belowVal + @lastline', z'' >= 0, z1 >= 0, @belowVal >= 0
newline#2(z, z', z'', z1) -{ 1 }→ 1 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0
newline#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
newline#3(z, z', z'', z1, z2) -{ 14 }→ s41 :|: s41 >= 0, s41 <= 1 * @x' + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, @x' >= 0, z = 1 + @x' + @xs, @xs >= 0
newline#3(z, z', z'', z1, z2) -{ 15 }→ s42 :|: s42 >= 0, s42 <= 1 * s17 + 1 * z' + 2 * z'' + 1 * z + 3, s17 >= 0, s17 <= 1 * 0 + 1, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0, z = 1
newline#3(z, z', z'', z1, z2) -{ 13 }→ s43 :|: s43 >= 0, s43 <= 1 * 0 + 1 * z' + 2 * z'' + 1 * z + 3, z'' >= 0, z1 >= 0, z2 >= 0, z >= 0, z' >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 10 }→ s38 :|: s38 >= 0, s38 <= 2 * @x' + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, @x' >= 0, z'' = 1 + @x' + @xs, @xs >= 0
newline#4(z, z', z'', z1, z2, z3) -{ 11 }→ s39 :|: s39 >= 0, s39 <= 2 * s18 + 1 * z' + 1 * z1 + 1 * z + 3, s18 >= 0, s18 <= 1 * 0 + 1, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0, z'' = 1
newline#4(z, z', z'', z1, z2, z3) -{ 9 }→ s40 :|: s40 >= 0, s40 <= 2 * 0 + 1 * z' + 1 * z1 + 1 * z + 3, z'' >= 0, z2 >= 0, z >= 0, z3 >= 0, z' >= 0, z1 >= 0
newline#5(z, z', z'', z1, z2, z3) -{ 7 }→ s37 :|: s36 >= 0, s36 <= 2 * z + 2 + 1 * z' + 1 * z1, s37 >= 0, s37 <= 1 * s36 + 1 * z'' + 1, s22 >= 0, s22 <= 2, z2 >= 0, z1 >= 0, z >= 0, z3 >= 0, z' >= 0, z'' >= 0
newline#6(z, z') -{ 1 }→ 1 + z + z' :|: z >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 4 }→ s26 :|: s26 >= 0, s26 <= 1 * z' + 1 * z1, z1 >= 0, z = 1, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 2 }→ s35 :|: s35 >= 0, s35 <= 2 * z'' + 1 * (1 + (1 + 0)), z = 2, z1 >= 0, z'' >= 0, z' >= 0
newline#7(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
plus(z, z') -{ 1 }→ s27 :|: s27 >= 0, s27 <= 2 * z + 1 * z', z >= 0, z' >= 0
right(z) -{ 2 }→ @x :|: z >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
right(z) -{ 3 }→ s19 :|: s19 >= 0, s19 <= 1 * 0 + 1, z >= 0, z = 1
right(z) -{ 1 }→ 0 :|: z >= 0
right#1(z) -{ 1 }→ @x :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
right#1(z) -{ 0 }→ 0 :|: z >= 0
right#1(z) -{ 2 }→ 0 :|: z = 1, 0 = 0
right#1(z) -{ 1 }→ 0 :|: z = 1, v0 >= 0, 0 = v0

Function symbols to be analyzed:
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
right#1: runtime: O(1) [2], size: O(n1) [z]
max#1: runtime: O(1) [1], size: O(n1) [z' + z'']
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
newline#6: runtime: O(1) [1], size: O(n1) [1 + z + z']
firstline#1: runtime: O(n1) [1 + 3·z], size: O(n1) [z]
firstline: runtime: O(n1) [2 + 3·z], size: O(n1) [z]
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
lcs#3: runtime: O(1) [2], size: O(n1) [z]
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
max: runtime: O(1) [3], size: O(n1) [z + z']
#greater: runtime: O(1) [1], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
right: runtime: O(1) [3], size: O(n1) [z]
lcs#2: runtime: O(1) [3], size: O(n1) [z]
#equal: runtime: O(1) [1], size: O(1) [2]
plus: runtime: O(1) [1], size: O(n1) [2·z + z']
lcs#1: runtime: O(1) [4], size: O(n1) [z]
newline#7: runtime: O(1) [4], size: O(n1) [2 + z' + 2·z'' + z1]
newline#5: runtime: O(1) [7], size: O(n1) [3 + 2·z + z' + z'' + z1]
newline#4: runtime: O(1) [11], size: O(n1) [3 + z + z' + 2·z'' + z1]
newline#3: runtime: O(1) [15], size: O(n1) [3 + 2·z + z' + 2·z'']
newline#1: runtime: O(n1) [20 + 18·z], size: EXP
newline#2: runtime: O(n1) [37 + 18·z''], size: INF
newline: runtime: O(n1) [21 + 18·z''], size: INF
lcstable#3: runtime: O(n1) [22 + 18·z'], size: INF
lcstable#2: runtime: O(n1) [23 + 18·z'], size: INF
lcstable#1: runtime: O(n2) [3 + 25·z + 18·z·z' + 3·z'], size: INF
lcstable: runtime: O(n2) [4 + 25·z + 18·z·z' + 3·z'], size: INF
lcs: runtime: O(n2) [9 + 25·z + 18·z·z' + 3·z'], size: INF

(203) FinalProof (EQUIVALENT transformation)

Computed overall runtime complexity

(204) BOUNDS(1, n^2)